In: Computer Science
Purpose: Experiment the interactive mode with php
Instruction: Implement the following two different requirements and compare the results:
Implementation 1: Create a html file (login.html) with a login form that contains two labels, two text boxes and one submit button as follows:
User Name: ______________
Password: _______________
submit
When a user enters values for user name and password text boxes and clicks the submit button, the values are sent to login_handle.php and the values are assigned to two variables: $username and $password. Then, the scripts respond to the user a welcome message with the user name. For example, if a user enters "Peter" as the user name and the password, then the script responds to the user "Welcome Peter!"
Implementation 2: Create a user.html file with a user form as follows:
User Name: ______________
submit
When a user enters a value for the user name text box and clicks the submit button, the value is sent to user_handle.php and assigned to a variable: $username. Then, the script responds to the user with a form with one label and one text box as follows:
Password: ______________
submit
When a user enters a value for the password text box and clicks the submit button, the value is sent to password_handle.php and the password value is assigned to a variable: $password. Then, the scripts respond to the user a welcome message with the user name. For example, if a user enters "Peter" as the user name in the user.html then the script shall respond to the user "Welcome Peter!"
1.Implement
first page:
second page:
2.Implement
first page:
second page:
third page: