Wednesday, 15 September 2010

php - Allow access for athenticated users to specific areas of the webpage -


Then start to regret if my title is wrong for this question.

The login / registration system is created when I login to my website $ _ session creates a session called [user '] , I want That my user is not logged in (only for this example)

  Click here to login to this website (here) Please keep our (TOS) in mind < / Code>  

and then users who are logged in

  James click to play some games (swag Welcome) Click (here) to see our SOS (click here) ...   

So how would I accomplish this? I know that I have not done this before, but I think remember the code

thanks in advance!

Checks whether the session user is set up, then echoing the appropriate strings.

  & lt ;? Php if (isset ($ _ session ['user'])) {? & Gt; Welcome to James Click (here) to play some games Click here to see our TOS (here) ... ...? Lt ?? Php} else {? & Gt; To login or register, click on this website (here). Please welcome us (TOS) & lt ;? Php}? & Gt;   

Update: If you do not see one given earlier, then it should work.

No comments:

Post a Comment