Assignment 10
Create a simple login page. You may choose to add this page to your existing
site, or create a standalone page.
Required Knowledge & Skills
- account on AwardSpace
- setting up a MySQL database
- creating and populating tables in MySQL
- HTML forms
- Form handling with PHP
Login Form (50 Points)
Create a custom dynamic page with a login form in PHP5
on AwardSpace.
- Create a Bootstrap form with 2 input elements of type text (username and password), and a submit button. (10 points)
- Use the action attribute of the form to handle the login functionality. (10 points)
- Using PHP, authenticate the login credentials of the username "admin" such that the password is "pass123". (Hint: PHP has a built-in "strcmp" function to compare strings) (10 points)
- Display "Success" or "Invalid Credentials" depending on whether or not the credentials were entered correctly. (10 points)
- Aesthetics: use Bootstrap classes for styling and pay attention to consistent spacing and font-sizes. (10 points)
Hints
- Save your script before you run it or you will lose your work.
- Test a small piece of code, make sure it works before you add more to your code.
- Get the HTML to work first in an interactive editor (like w3school editor), then place the PHP code around it.
- Make sure there a semi-colon at the end of each statement, except when there's a { after.
- Be sure to close all strings.
Submission - Upload your website to AwardSpace. Submit the two files for this assignment as well as a link to your new page (as a submission comment) to Canvas.
No email submissions will be accepted. We will be unable to grade the assignment if you do not submit a link.