I have this issue which looks simple to me but just cant get it right. I have this code in the login page. This code gets executed after all checks, when the user should be logged in.
Code: Select all
session_start();
$_SESSION['email'] = $email;
$_SESSION['name'] = $getAccount3['name'];
$_SESSION['public_name'] = $getAccount3['public_name'];
header("Location:http://www.domain.com?tag=index");
mysql_close($con);
die();Code: Select all
session_start();
$tag= $_REQUEST['tag'];
if(ISSET($_SESSION['email'])){
if($tag == 'index'){
include ("index-home.php");
}else{
print "index error";
}
die();
}else{
print "Not logged in";
die();
}Thank you,