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

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.