hi!
i wanted to make a header to put on all the pages of a website.
I also want the choice the user selects to be bold when the content page loads (and it no longer needs to be a link anymore, since it is the currently viewed page)
So... for example, if my menu across the top is
choice 1 | choice 2 | choice 3 | choice 4 | choice 5
then upon clicking on the number 2, the user will be directed to content page 2. at that time, the menu (using the same header) will show choices 1,3,4,5 as links to those respective pages. However, 2 will be bold (or a different color or something) and NOT a link anymore.
I can do it, but it seems like there's a better way than I have done... Is there a way to do it without snatching the currently viewed page out of the address line?
------ i did this -----
page loads : //whatever.com/index.php?content=1
then i snatch the content var to check every menu option.
pseudocode follows:
<? if content=1, then echo "<b>", else echo "<a href="index.php?content=1>" ?> choice 1
<? if content=1, then echo "</b>", else echo "</a>" ?>
followed by the same thing for choices 2-5.
Basically, right before the text , it says "is this the current page?" if yes, make me bold (and skip the part where i become a link)... if no, make me a link.
Is there a better way to do this? also, my if then code is really crappy, because i just modeled it after a sample "if, elseif, else" tutorial... i noticed there seem to be MANY different syntax for this.
does anybody have a suggestion as to a very CONCISE format of doing this? actual code for one menu choice would be GREATLY appreciated.
additionally, is there a way to do it without using the var passing in the address bar?