Jump to content

Wanting to switch menus between one for visitors and one for members.


dt_gry

Recommended Posts

I am trying to setup 2 separate menus one for visitors and one for members, I have the site setup where everything is loaded on top of index.php so you have like index.php?section=home or index.php?section=login.

 

I am wondering is it possible to do a test if the user is logged in and have that menu load via index.php based on a true/false answer.

 

If anyone can point me in the right direction it would be great.

 

Thanks guys.

dt_gry

Link to comment
Share on other sites

Well, when someone successfully logs in, you should store something in the SESSION (usually the username). Then, when you are loading your menu, you can check for he existence of that value and just do an IF/ELSE for each menu.

 

Make sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.