Thank you for your answer Ted, You are right, well, I do have my login form, but what I do not understand is how to implement switch statement. switch ($level){ case 0: include ("admin.php"); break; case 1: include ("sales.php"); break; case 2: include ("superuser.php"); break; } Now I'm wondering if every page has to have something like: if ($level==2){ } else { } but, I think that might check link pages, and whole menu... Not, just the menu for admin as example. So, that's why I'm asking for help... I was saying just the idea to get example codes, to base on it, asking : how do I get to london?, not how do I drive a car? Thanks. Carlos Sura. > Date: Tue, 29 Jun 2010 15:58:10 -0400 > To: carlos_sura@xxxxxxxxxxx; php-general@xxxxxxxxxxxxx > From: tedd.sperling@xxxxxxxxx > Subject: Re: Login form + User level access > > At 7:46 PM +0000 6/29/10, Carlos Sura wrote: > >Hello everyone. > > > >I have this question: I'm developing a login system but what I need > >is to do is access levels > > > >I mean, in my database I have this users: > > > >Admin > >Superusers > >sales > >purchase > >etc > > > >So, What I do basically need is, when a user from sales log in.. I > >want him to see just the menu from SALES, He cannot see others menu > >options, and he can't get access, I was reading that I can do that > >with Switch, but really I have no idea about it... Any help? > > > >Thank you. > > > >Carlos Sura. > > Carlos: > > That's a little like saying, "I want to build a car so I can drive > around the country. I was reading that I could do that with a key, > but I don't have any idea about it... Any help?" > > Yes, you can use a switch statement, but that just one control > structure in a much, much larger application. > > Cheers, > > tedd > > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com _________________________________________________________________ http://clk.atdmt.com/UKM/go/197222280/direct/01/ Do you have a story that started on Hotmail? Tell us now