WAP to create a login form:
- accepts username and password.
- when the username and password matches, it should redirect to a home page.
- indicate "Hello $username" where $username is the username entered in the login form.
- or password is incorrect, it should redirect to the login page with an error message "Invalid username or password".
- use the concept of sessions to store the username and password.
database: csit
|
|_ table: login
| |
| |_ id int PK AI
| |_ uname varchar 100 unique
| |_ password varchar 100
| |_ email varchar 100
| |_ DOB date
| |_ photo varchar 100
login(/)
|
|_ register.php action: saveUser.php
|_ saveUser.php -> $uname, $password, $email, $dob, $photo
|_ login.php action: checkUser.php
|_ checkUser.php -> $uname, $password
|_ home.php