Page 1 of 1

Sessions directory sepcific?

Posted: Tue Dec 31, 2002 11:09 am
by Elmseeker
Are sessions in PHP directory specific? I am trying to set it up so that if someone tries to go my sites images sub directory they will be redirected to the main page of the site unless they are logged in and have a certain user level...I am logged in with that user level and I still keep getting redirected...I tried using some echo's to find out the session info but it appears that there is none, though when I go back to the main page of the site it says Welcome Back Elmseeker and shows my session info...here is the code of the page in the images directory:

Code: Select all

<?
if ( !$login ) {
header("Location: http://kidstop.farviolet.com/");
} else if ( $_SESSION["login"]["u_level"] == 11 ) {
opendir("/home/tiffani/public_html/kidstop/images");
}
?>
Thanks guys and gals!

Posted: Wed Jan 01, 2003 1:03 am
by hob_goblin
hey, remember to put session_start() at the begining of every file using sessions! :)

Posted: Wed Jan 01, 2003 7:02 am
by Elmseeker
DOH!!!!!


I am SUCH AN IDIOT SOMETIMES! Why is it always the easy little majorly glaring errors I miss? the hard to spot where they are bugs...NO PROBLEM, find 'em in short order usually...but not the easy ones...NNNNOOOOO those have to torture me for days at a time!


Thanks a bunch!