Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hey There..I am totally new to php programming so please excuse me if this is a stupid question...
I want to store whether the user is logged in in a session variable...So, In my login page, I check their password against the databse, then I call this code...The session IS started on this page...Code: Select all
$_SESSION['IsAdmin']=1;
header( 'Location: AdminIndex.php' ) ;Code: Select all
<?php
session_start();
if(isset($_SESSION['IsAdmin']))
{
echo "Set";
}
else
{
echo "Not Set";
}
$_SESSION['Test']="TEST";
echo $_SESSION['Test'];
?>I have echoed session_id() on both the login page and the result page and the id is the same...
Is there some config variable that isn't set? I am using WAMP and I don't believe I have changed any of the default settings.
Thanks in advance!
Greg
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]