This is an old revision of the document!
Web Development Lesson 9 - Sessions
Exercises
Objective
In this activity you will create a login and logout page for your project and enable sessions to restrict adding new heroes and appearances to authorised users.
Setup
Login
Create 'login.php' with fields for 'user name' and 'password'.
Assume that registration has been completed already so you don't need fields for 'email' nor 'confirm password'.
Create 'login.js' and add code to check the entered details and either submit or show a message.
Add PHP code to 'login.php' to verify the password and redirect the user to 'form.php'.
Check that logging in works.
Logout
Redirect Unauthorised Users