Computer

PHP/Oracle Development


Syllabus
Schedule
Reading
Discussion
Project
Test
Resource
Tip

Project V Functions

Task:

You are going to develop a simple authentication function and implement the authentication function with your PHP code.

The authentication function will be named as: authenticate ($user, $password). It will perform the following logical operation.

If the user name is not "php_oracle," the following message will be displayed to the user:

"Your user name does not exist in the system." (20 points)

If the user name is "php_oracle" but the password is not "superman," the following message will be displayed:

"Your password did not match with the system." (20 points)

If the user name is "php_oracle" and password is "superman," display the following message:

"Congratulations. You are in the professional club." (20 points)

Please note that the punctuation (such as " or ,) are not part the project specification.

 

PHP Program Requirements:

You are required to submit one PHP program file, which will conform to the following specifications:

  1. You will use the form.php as an data entry form. You may download the file by double clicking it or right click, depending upon your browser behavior. It is also available from the Class Notes 5.

    Another way to get the code for the form: Double click the above form.php link. View the source code in your browser. You may then copy the source code and save it as form.php.

  2. The above authentication function will be placed at the end of your PHP program that will be named according the naming convention below. Please see the above detailed specifications for the authentication function.

  3. In your PHP program, you need to have the following:
  • Define your variables so that your PHP program will receive the value of the variables from the above form.php file after the user click the "Submit" button. (10 points)
  • Call your authentication function (10 points)
  • Define your authentication function (80 points)


    Note: It will be encouraged if students like to put the html form and PHP code together in one file, similar to what Team 4 did.
    Extra miles are always good.

 

Standard for File Name: We are going to practice a typical software development practice. That is, everyone is going to use a standardized convention for naming your project files. Please name your file as firstname_lastname_project5.php, where firstname and lastname are your first and last name, respectively, and "_" is underscore. The file naming convention will be enforced throughout this semester. 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.