Ok I'm a n00b yada yada (lol)...
I have a .htm page on which I want to add a PHP script that will display links depending on if the user is in session or not. I'm not sure if this can be done on a strictly .htm page, but hey you only live once right? Here's the script I'm attempting to execute:
<? if ($_SESSION['auth'] == "yes"){ ?>
<a href="/index.php?page=sign_in">Sign In</a>
<? }else{ ?>
<a href="index.php?page=logout">Logout</a>
<? } ?>
The problem is that I don't know all the back-end php coding for the 3rd party s/w I'm using, but since the design calls for a "main .htm page" that displays all the "include" pages, having 2 links displaying on the same page seems silly (1 link for login and anohter for logout).
So how can I combine these links and have them display depending on the session state of the user? Or is there a better way of accomplishing this all together? Thanks much for any help given.