Page 1 of 1

Session information Error??

Posted: Mon Dec 23, 2002 9:16 am
by Rob_Beard
Hey all,

I'm having a few problems, my host is using php 4.2.1, on Apache.

Anyway, My admin panel which i'm building requires the admin username which is stored inside the session cookie on the server. However, as soon as my system goes from the validation.php page to the admin.php page, it doesnt recognise the session cookie as containing any data, but yet

session_start();
if (isset($_SESSION["username"]))

still allows them to view the page, rather than sending them back to the login screen?

Any ideas?

thanks,
Rob

Posted: Mon Dec 23, 2002 10:46 am
by penguinboy
echo your Session

echo "<pre>";
print_r($_SESSION);
echo "</pre>";


how are you setting your session?

Posted: Mon Dec 23, 2002 12:14 pm
by Rob_Beard
Thanks for replying, but i got it sorted now, I just declared the session value as a seperate variable at the top of each page.