Hi there!
I'm using PHP together with jQuery/AJAX to submit a login form without reloading the page. Basically the code works like this:
Login.php (The actual form) -> process-login-admin.php (server-side validation and authentication) -> Echo error message
The error messages is displayed in a hidden div (#feedback) on "Login.php" that i set to visible once "login-process.php" echos something.
This is how i do it:
$.post('process-login-admin.php', $("#loginprocess").serialize(), function(data) {
$("#feedback").html(data).show("slow");
});
}
Everything works just fine except one thing. When a user successfully logs in i would like to do a simple header location to the users dashboard/profile page. However the dashboard loads inside the message div i created instead of changing url.
Anyone that could give me a few pointers on how to solve this?