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