I have the following code:
function get_login()
{
hideshow('loading2',1);
error(0);
$.ajax({
type: "POST",
url: "The URL",
data: $('#logins').serialize(),
dataType: "json",
success: function(msg){
if(parseInt(msg.status)==1)
{
succ2(1,msg.txt);
setTimeout('go_to_you_page()', 1000);
} else if(parseInt(msg.status)==0) {
error2(1,msg.txt);
}
hideshow('loading2',0);
}
});
return false;
}
function go_to_you_page()
{
window.location = 'myaccount.php';
}
If the user is not logged in, it will add index.php?redirect=inbox.php
(for example)
How can i redirect the user after logging in to the /inbox.php
?
Thank you in advance!