I am trying to display the logout button only if any user is logged in.
following is the code:
<?php
if(isset($_SESSION['user']))
{ echo '<li><a href='logout.php'>Logout</li>'; }
?>
But it is giving error. Error:Parse error: syntax error, unexpected 'logout' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\index.php on line 42 Help me to display this link.