Can anyone say why this code works in my 'footer.inc' file on my website, but not in my 'header.inc'?
<?php if (isset($session['user_id']) AND (substr($SERVER['PHP_SELF'], -10) != 'logout.php')) {
echo '<a href="logout.php">Logout</a></font></div>'; } else {
echo '<a href="login.php">Login</a></font></div>'; } ?>
I use exactly the same code in both. Confused or what?
Any help welcomed.
😃