SESSION and include

From: Date: Wed, 08 Feb 2006 15:23:46 +0000
Subject: SESSION and include
Groups: php.general 
Request: Send a blank email to php-general+get-230095@lists.php.net to get a copy of this message
Hi PROBLEM: I want to let certain users use certain funcions on my page. To manage that I start a session and define $_SESSION[user_level] to a value from a mySQL table. So far so good. Users with $_SESSION[user_level]=="1" can access things on the .php page they are on. I made a simple if-statement to handle that. Now the problem is that i want to use include("page.php") and let the users with user_level=1 access special things on that included page. The if statements that let them change things work if I access the page directly from my browser but not when it is included in that main page. Whats am I missing? /Fredrik

« previous php.general (#230095) next »