Task:
Our main focus for this project is to query an Oracle database using your PHP program by using Oracle bind variable. You may use the the class notes and the SimpleBindFun.txt code as a reference point. Your mission is as follows:
- Use the SQL script provided here to create a table called "user_table." If you have followed the steps in Class Notes, you may drop the table before you run this script. The SQL command is: "drop table user_table;"
Please make sure to login as php/php in your SQL PLus before running the above script.
- Use your PHP program to perform a simple authentication check: If the password for Tim Howard (user name: thoward) matches "mygoalie#1", print out a message "Welcome, Tim. You did a good job at the World Cup." Otherwise, the output will be "Sorry, please contact your account administrator for your account login."
PHP Program Requirements:
You are required to develop one PHP program as follows:
- Use the Oracle connection parameter file as defined in the previous project (same file name: oracle_parameters.php). Direct specification of the parameters within your main PHP program is not acceptable. The exact spelling of the three parameters remain the same as the previous project. (10 points).
- Define your PHP variables. The value of the user name and password are: "thoward" and "mygoalie#1", respectively. (10 points)
- You are required to use Oracle bind variable(s) to accomplish the task. (40 points)
- The PHP program will perform the authentication check as specified above. The sample output will be as follows (40 points):
"Welcome, Tim. You did a good job at the World Cup." (If the conditions are right.)
or
"Sorry, please contact your account administrator for your account login." (If the conditions do not match.)
(Quotation marks are not required.)
Your PHP code will be tested for its intended functions by changing the value of the variables within your PHP code.
- You may define all necessary information within the PHP file including user name and password. (In real programming, the input will be coming from user input through a HTML form. Do not worry. We will do it in our final project.)
Submission Requirements:
You are required to submit only one PHP code file.
Standard for File Name: The file naming only applies to the Microsoft Word file. Please name your file as firstname_lastname_project7.php, where firstname and lastname are your first and last name, respectively, and "_" is underscore. Five (5) points will be taken off if the file is not named according to the convention.
Please submit your project on D2L according to the deadline established on the course schedule. |