I am trying to use PHP in an HTML page to change Login to Logout and reference my login page. Instead of printing 'Login' and 'Logout' I get the following: Logout" ; } else { echo" Login" ; } ?>
The IF function seems to get confused and starts echoing Logout when it should not start until Login. My code is for the last selection on an html line
<?PHP
if ("$login_successful" == "1") {
echo"<a href='http://www.icselect.com/login.php?logout=1'> Logout</a>" ;
}
else {
echo"<a href='http://www.icselect.com/login.php'> Login</a>" ;
}
?>
Any suggestions are welcome.