Hello everybody,

I use session variables quite frequently bus this time when I set variable in one page and try to access it on another page, its just empty. Here's my code:

Page 1:
Code:
<?
	include "../includes/connect.php";

	$_SESSION["admin"] = "yes";
	echo "<script>location.href='main.php'</script>";	
?>
Page 2:
Code:
<?
	session_start();
	echo $_SESSION["admin"];
	exit;
	
	include "../includes/connect.php";
?>
Please let me know what I am doing wrong here?

Thanks.