Make the following changes to your home page:
- Add a login button to your home page, when clicked display a login box on top of the page (do this using
cgi or AJAX, do not make a separate login page).
- when the user enters the username "admin" and the password "admin" display the myScrollingData page. If
the user enters any other userid and/or password display an error message.
Make the following changes to the Scrolling Data form.
- Replace the myData.js file with an AJAX request to the server to retrieve
the data and populate the scrolling data form with the contents of the XML that is sent by the cgi program
that provides this service.
- Whenever data is added to the form send that data (using AJAX) to another cgi program running on the server
that will add it to the database (a comma seperated text file, with one person per line)
- deleting a person should also send an AJAX request to the server to delete the person from the database.
- unprotect the data fields in the scrolling form and add a request (AJAX) that will allow the database to be
updated with new data when the user changes any of the fields (except the name field, leave it protected).
- all changes to the database should be logged in a text file as follows:
- one line per transaction
- the text 'add' , 'delete' or 'update' followed by the name if the person whise recored is being modified
The database, should at all times reflect what is on the screen.
The page should be stateful and use the database for persistence. If you need to, use hidden variable(s) to help
maintain state.