Description
- html – Create a form that contains two input fields on it: usernameand password. When the form is submitted, it should go to login.php.
- php
Check if both username and password are provided. If user input is missing in one of these fields, redirect user to login.html.
If both is given, thencheck if the user exists in the database and password matches with the stored password. If the user exists and passwordmatches, storeuser information (username) in session variable and redirect user to welcome.php. Otherwise, redirect user to login.html. You don’t need to display any error messages.
- php
Check if the user has signed in to the system: check if the session variable for ‘username’ is set. If it is set, welcome user byuser’s fullname. Show the avatar for the user.Display the list of favorite movies for the user.
Otherwise redirect user to login.html.
DB name: PW5
Users (username, password, fullname, email, avatar)
Movies (movie_id, title, year)
FavoriteMovies (username, movie_id)

