Lab #7: Communicate with MySQL through PHP & HTML Forms
Purpose: In this lab, you should gain the basic skills to (i) manually create a simple web page by writing HTML tags into a .htm file using simple software like notepad or wordpad, (ii) use the HTML form tag in the web page to accept data submitted by the user and transmit the data to be processed by a PHP script, (iii) write a simple PHP script to process the data submitted and send feedbacks to the user, and (iv) upload both the web page and the PHP script to your CS X account to interact with them through the Internet.
Things to do and report: Go over steps below and inform me of your progress in these exercises in your weekly progress report.
Step 1: Play with a sample web page and a sample PHP script
Step 2: Create the sample tables under the test database of your own MySQL account
Step 3: Enhance the web page as the interface to receive user inquiries into the Sample MySQL database tables
· Try to create a web page and a PHP script like what you see in Step 1 above. You should create a simple web page say, lab7Exp.htm, composed of HTML tags you learned from step 1 using simple software like notepad or wordpad. This page should contain at least two input fields of the text type and one submit button. People should be able to submit data to be processed by a lab7Exp.php script of your own. Your page should be able to display the contents of the salespeople table.
Step 4: Upload your version of the web page and the PHP script to the Sites folder of your CS X account.
Step 5: Access the web page through the Internet to interact with MySQL and retrieve data from the Sample database tables
Useful online references: