-
Mar 18, 2005, 09:04 PM
#1
Control display by session/cookies
hey guys
I'm using php to design this web site, however, i want to control areas of the site base on whether or not the user is a guest or a member.
I have a shopping area where only member should get on to it, visitors will only be able to browse available products.
Does any body have any ideas where I can find resources that does this, or give me a woking example of this being done.
-
Mar 18, 2005, 11:48 PM
#2
Re: Control display by session/cookies
you could check out phpfreaks.com but i mean when you think of it logically its not that difficult, its all about session verification header codes, you need to design a redirection script that will check the session variable state
{say you stored the "registered" in a session variable called $_SESSION['userstate'] if the user is successfuly logged in and "guest" as default}
now you should have a script that checks at the top of the page to see the content of the $_SESSION['userstate'] and act accordingly "you could call a page that displays "only for registered users" or you could use a redirection and redirect the browser to a different part of the site. the choice is yours.
hope i shed some light on the matter.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules