Re: SESSION and include
| From: | Barry | Date: | Wed, 08 Feb 2006 15:26:02 +0000 |
| Subject: | Re: SESSION and include | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230096@lists.php.net to get a copy of this message | ||
Fredrik Tillman wrote:
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 use require()www.php.net/require Greets Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)