INTRODUCTION PHP is a very popular high-level scripting language. It supports object-oriented programming, file operating, arithmetic calculating, and many other features. It combines with the simplicity of the C language features. MySQL is a powerful and comprehensive relational database server. Structured query language (SQL) can be used to communicate with it. MySQL is a multi-platform system, which can also run in Windows and a variety of UNIX and other operating systems besides Linux. The powerful and flexible network program can be developed with PHP and MySQL. PHP can be used to create dynamic web pages and functions, connect resources and manage the user. MySQL is used to store the relevant data for displaying, updating, deleting, modifying and other operations. LED management system provides lots of functions, such as login, authorization management, graphic /text edit, single/ multiple terminal sending and so on.
CREATE SIMULATION ENVIRONMENT The needed software is XAMPP, which provides a complete PHP, Apache ,and MySQL Web development environment. The software can be downloaded and installed, then unzipped and run. XAMPP is available for Windows. It can be started after installed.
CREATE THE DATABASE AND TABLES PhpMyAdmin is used to create the database which is a tool included in XAMPP. The Web browser can be opened and connected to a login screen of phpMyAdmin by accessing hrtp://localhost/phpmyadmin/. The database stores its data in a series of tables. Every table consists of fields and records. After created database tables, information can be defined to store in the fields. But it is essential that a unique record can be achieved when the table is created. The solution is to create an additional field that contains a unique ID number for that record. While a new record is added to the database, the ID will be increased by One. After logged into the phpMyAdmin, firstly, a database named led should be created. Then a table named logins should be created and three fields are inserted. In the first row of the field column, id is added as the name and the data type is TINYINT (suppose there is only one user). Then select the Extra box and turn on auto increment and set this field as a primary key. This option automatically fills the id field when a record is added. When the option enabled, each new record recorded in the id column is one bigger than previous one.
Suppose the username is China Construction Bank and the password is 121112(In the form the password is masked as circles for safety). The username type should be selected as VARCHAR and added 10 as the length. Meanwhile, the password type is selected as VARCHAR and added 6 as the length, after the table constructed completely, data can be loaded. Browsing the table, the characters added are displayed as “?” .The solution to this problem is to set the type as “gbk_chinese_ci” in the selected drop-down menu. Then the “China Construction Bank” can be viewed correctly as characters. But now it can’t be queried database in Chinese until a few statements are added in the SQL statement. The code can be found in 5.21.
ACCESS DATABASE BY PHP In web development, forms is one of mostly used units in the program. Filled the form, and then the form will be sent to the server to be interpreted and processed. To process a form, there are two steps. Firstly, the form should be filled in. Secondly, if the submit button is clicked, the data should be sent to the server for being processed. PHP is tightly integrated with Apache on the server. All database connections/queries are executed by PHP. MySQL is a data storage device.
CONCLUSION The LED management system which realizes the web login and other function is stable and safe and meanwhile makes technological foundation for more personalized web function. In the future, the system can be widely utilized via more functions provided.