Lab #6: Retrieving User Data submitted through 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 exercises below and inform me of your progress in these exercises in your weekly progress report.
Step 1: Get familiar with the very basics of HTML
Step 2: Play with a sample web page and a sample PHP script
· Exercise 2: Play with this sample web page with a form and see the contents of this webpage and the contents of the PHP script lab6.php that processes the submitted data. Carefully tudy the form tag in the sample web page and how the PHP script process the submitted data.
Step 3: Create a web page with a form in it.
· Exercise 3: Try to create a web page and a PHP script like what you see in Step 2 above. You should create a simple web page say, lab6Exp.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 fileds of the text type and one submit button. People should be able to submit data to be processed by a lab6Exp.php script of your onw.
Step 4: Upload your webpage and your PHP script
Useful online references: