Question
PHP Program Present a page ( start.html ) to the user. This page should have a form with 2 fields, login name and password. Hide
PHP Program
Present a page (start.html) to the user. This page should have a form with 2 fields, login name and password. Hide the text for the password. There should be a button to login. There should also be a separate link to create an account. The login button should connect to login.php
When the user clicks on the create account button, they should go to createAccount.html. This page should have a form with 2 fields, login name and password. Hide the text for the password. There should be a button to submit. This submit button should connect to createAccount.php.
createAccount.php should read in the list of current users from the file pass.txt. If the user name already exists, inform the user that they can not use the name that they chose and present them with a link back to createAccount.html. If the user name did not already exist, add this account to the pass.txt file.
pass.txt should have the format username:SHA-1(password)
Do not save plain text passwords, you must store the Hash of the password.
After the new account has been created, present a link to a file accessData.html
accessData.html should have two buttons (no input) use 2 forms. The first button connects to addRecord.html. The second button connects to searchRecords.html.
addRecord.html should present a form with 3 inputs, first name, last name, and phone number. There should be a submit button and a clear button. The submit button should connect to a file addRecord.php.
addRecord.php should open a file employees.txt for append mode. It should add the employee record to the end of the file in the format Lastname:Firstname:Phone. A message should be displayed that indicates success. Also a link should be provided back to accessData.html.
searchRecords.html should have a form with a single text box for last name. You should have a submit and clear button. The submit button should connect to a file searchRecords.php
searchRecords.php should read the file employees.txt into an array. Search through the array, and display the last name, first name, and phone number for every employee that matches the last name that was submitted to this page. Use a table to display the information. A link should be presented that links back to accessData.html.
login.php should check that the given user name exists in the pass.txt file. It should also calculate the SHA-1 hash of the given password. If the user name and hashed password pair match, provide a link to the user to the accessData.html page. If they do not exist, print and error message, with a link back to the start.html page.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started