Hi,
i want to login with facebook and go back 1 page - window.history.back() - but only when error=1 (login.php?erro=1):
This is the process_facebook.php:
if($UserCount[0]){
//User is now connected, log him in
login_user(true,$me['first_name'].' '.$me['last_name']);
echo $_GET['erro'];
/*if(isset($_GET['erro'])){
echo "<script>window.history.back();</script>";
}*/
}
else{
// Insert user into Database.
@mysql_query("INSERT INTO users (userid, fullname, email) VALUES ($uid, '$fullname','$email')");
//User is now connected, log him in
login_user(true,$me['first_name'].' '.$me['last_name']);
echo $_GET['erro'];
/*if(isset($_GET['erro'])){
echo "<script>window.history.back();</script>";
}*/
}
But it does not work:
Notice: Undefined index: erro in C:\xampp\htdocs\00my_works\furgonet\process_facebook.php on line 66