Forum Moderators: coopster
Yes I'm a green Horn.
Having a bit of an issue with setting navigation from my Nav bar.
Essentialy what I am trying to accomplish is: I have a members link on my Nav bar.
( nav bar segment for members section )
<?
if ($current_section == "Members Only") { ?>
<div><a href="/members/"><img src="/images/members-on.gif" width="78" height="36" alt=" Members" title=" Members" border="0" /></a></div>
<? } else
{ ?>
<div><a href="/members/"><img src="/images/members-off.gif" width="78" height="36" alt="Members" title=" Members" border="0" /></a></div>
<? } ?>
The above works great.
Now i need to add the ability for this portion of my nav bar or header menu to be able to tell if a member is logged in and redirect to a members landing page and not to the members sign up and log in page as it does now when they click the members button in the nav bar.
I was going to use something like this but not sure where in the above code it would go to be effective and I already have an if statement there.
(code I was planning on using)
<?php if ($user->id) {
<a href="/members/members.php">;
} else {
<a href="/members/">;
}
?>
Any help would be appreciated.
Cheers
Mud