Menu
I’m using AJAX to send login information to my login.php script. I’m doing this so that error messages such as “incorrect password” can be written to the page without the need to refresh the page or go to another page.
My problem is, when the users username and password match, I’m using the following code to send the user to another page:
header(“Location: secure.php”);
Instead of redirecting the user, AJAX is reading the output of secure.php as responseText and writing it to the page, obviously not the result I was looking for.
Any suggestions?