Say i have a form, which request the user to input username and password. it also have a submit button.
its "action" is set to "submit.php"
when i click the submit button, i would like to verify the username and password.
if it is valid, it does something. if it is invalid, i want it to go back to the previous page, BUT this time, the username and password that the user input previousely is there in the username and password field.
i tried something like this:
<form action="submit.php" method="post">
username : <input type="text" name="username">
password : <input type="password" name="password">
but whenever i checked in submit.php that the username and password are invalid, and when i hit the back button of my browser, all the fields are empty.
how do i resolve this?