I have a login system in my site. But here is a problem that is when a visitor visit a restrict page then he/she get a login form after success login how to i'll redirect him/her last 2 page url. I mean last page visited before page.
my last script is
if($count==1){
// store session data
$row = mysql_fetch_array($result);
//echo $row['name'];
$_SESSION['harun']= $row['email'] ;
//print $row['name'] . "Thanks, Redirecting";
header("location:member_login_success.php");
}
else {
//echo "Wrong Username or Password";
//print "Wrong Username or Password";
header("location:member_login_wrong.php");
}
?>


