First, configure the PHP writing environment: ... The easiest way is to download a fool-style installation, such as MyWebServer V1.1.5 I use, which implements the perfect combination of APChe PHP MYSQL Perl under Windows 2000 Professional System. Both the server and compilers can run normally, it can easily debug and run the PHP / CGI MySQL program. They are PHP v4.3.6 mysql v4.0.18 apache v1.3.31. Second, find an editor test program: ... directly test the operation of the database, start, write a small program to add data: 1. Establish a connection, generally many files will be used, so will It is saved as Data_Link.php as an architectural file.
2, use the connection, remember to include the file, use the absolute path containing the included method, security is easy to modify:
3, add data, first learn to use this easiest way, in Values (), we only need to insert the value you want to insert in the order in the data sheet, remember $ 1 $ 3 ... ... The corresponding is the column of the data sheet, the order is unlikely, if you don't want to insert the value, you can use '' empty.
4, then look at the number of records that meet the requirements in the table:
5, finally look at the most common instructions echo:
congratulations!
Chain Name '; Echo "Hello, Sakawinki / N"; Echo $ EXISTACCOUNT. "
/ N ";?> The code is used to connect to the string: $ existaccount. $ password 3, beginners pay attention: 1, php has a semicolon; 2, PHP has large brackets, small brackets, parentheses each input To be paired, it is easy to mistake; File; if you only need the background code execution, you can write in a file, such as the deleted code can be made in the displayed PHP file, you can also join the control script JavaScript to make the web page effect more and more human. A day studying notes