I have created three .PHP files as main.php which asks for username, password and forwards it to checklogin.php which has connection details for the MySQL database.
After entering login details on main.php, it successfully checks if the username and password entered are correct or not, and shows the appropriate message, which means that main.php and checklogin.php are working correctly.
checklogin.php forwards the browser to the third .php script
the contents of login_success.php are as follows :
However, this file still shows Login Successful even if I clear my cache/history/cookies after typing this in the browser :
instead of taking the browser to the main.php login screen
What's wrong with the code ??