Question: Exercise 2 You are required to create a login form so users can enter their username and password for authentication. You need to use three


Exercise 2 You are required to create a login form so users can enter their username and password for authentication. You need to use three input fields to create this login form and save the file as exercise2.html in week 10 folder. Layout and style of the web page is up to your discretion. The form should include a text input for username, a text input for password and a submit button. The method for form submission is POST and action is 'exercise2.php'. 'exercise2.php' will process the form fields and will check for basic authentication . add basic server-side validation to make sure the user submitted his details (posted from exercise2.html) and check for empty fields protection against SQL injection should be used through escape_string() when you retrieve username and password fields from posted form you need to check if the account already exists, you can check this by selecting the record from the account table with the same username and password that the user has entered in the form. . If a match is found, exercise2.php page should display a welcome message which includes the username and level of the user (session variable can be used to store the level information of an authenticated user). If no match is found, a redirect to exercise2.html should be presented
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
