Im trying to alter my section of code so that when i user enters an invalid username or password it displays "invalid" on the same page, and not a new page. i am trying to use a boolean variable to do this, here is my code on the login section.
I cut the code off to place only the relevant parts.Code:$failPass = false; if ($failPass == true){ echo'Error'; }else if($_SESSION['LOGGED_IN'] == true) {?>
On the loginauth page i have this code written.
However, when the loginauth redirects back to the first page, it does not display "error"Code:if ($num_rows <= 0) { header('Location: index.php'); $failPass = true; exit; } else {
Please help guide me.



Reply With Quote

Bookmarks