My introductory book is PHP and MySQL Web development from Novice to Master (5th edition), This book is very good, code style I also like.
1. Software in use
XAMPP N-In-place software (MySQL, php, Apache, etc.) Installation: Very simple, download can be used, no need to configure the environment and so on, get started quickly. If you encounter MySQL or Apache boot failure, and prompt port blocking and so on. Click Config to change the port inside, PHP is the scripting language, is to the Web server recognized language, so not directly open with the browser, but through the Apache Web server so the correct open posture is in the browser address bar input http://localhost/xx.php (if you have already launched Apache and this PHP file is to be placed in the HTDOCs folder in the XAMPP directory );
2. Start with the simplest login page. Account password, these two are forms, the properties of the form have action and method, etc., action= "xxx.php" (the target page is the thing to do after clicking login) method = "POST", if the form entered for post then the information will be the default $_post [‘???’] (??? is the name of the form);
Sample code
<!--login.html Simple Form Codes -<!DOCTYPE HTML><HTML><Head><MetaCharSet= "UTF-8"><title>Insert Title here</title></Head><Body><formAction= "login.php"Method= "POST"> <b>School Number:</b> <inputname= "id"type= "text" /> <b>Password:</b> <inputname= "Password"type= "Password" /> <inputname= "Submit"type= "Submit"value= "Submit"/></form></Body></HTML>
1<?PHP2 #Simple login.php file3 4 if(isset($_post[' ID ']) &&isset($_post[' Password ']))5 {6 Echo"The ID you entered is:".$_post[' ID '];7 Echo"The password you entered is:".$_post[' Password '];8}
After clicking Submit:
PHP and MySQL novice to do Web site (backstage) How to pass a form data