2. If the next page ("secrets.php") is accessed directly without ever logging in, the access must be denied and the user
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2. If the next page ("secrets.php") is accessed directly without ever logging in, the access must be denied and the user
2. If the next page ("secrets.php") is accessed directly without ever logging in, the access must be denied and the user should be redirected to login page. Write an HTML form for a user to login. The login form should have "Username" and "Password" fields and a submit button. Upon submission, check the user name and password. If the password is reverse of the user name case insensitively, then redirect the user to the next page which is called secrets.php. Print "Success" in the secrets.php along with the user's login name. If login fails, redirect the user to the login page again. The flowchart may look like this: Login form login.html Process the login process.php Login successful? Failed Succeed The next authorized page secrets.php