I have my code in PHP created for both log in and log out, I confess that I read several articles in google how to turn a log in button but I confess that it did not help at all, I'm here to ask if anyone can enlighten me how. My page index (SEE PHOTO) has a button called member area that I would like to become a button called log out when the user logs in. Updatedcode:
[![<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<nav class="navigation">
<ul class="mainmenu
">
<li><a href="index.html"><i class="material-icons">home</i></a></li>
<li><a href="">Books Categories</a>
<ul class="submenu">
<li><a href="bookcomputing.php">Computing</a></li>
<li><a href="bookromance.php">Romance</a></li>
<li><a href="bookfiction.php">Fiction</a></li>
<li><a href="booknonfiction.php">Non-Fiction</a></li>
</ul>
</li>
<li><a href="contact.html">Contact us</a></li>
</ul>
</nav>
<div id="memberarea">
<?php
if (!isset($_SESSION\['email'\])) {
echo "<a href='memberarea.html'>Member area</a>";
} else {
echo "<a href='logout.php'>Log out</a>";
}
?>
<a href="adminarea.php"><span class="glyphicon glyphicon-lock"></span> Admin area</a>
</div>
<form action="search.php" method="GET" id="search">
<input type="text" name="query" placeholder="author's name, title">
<input type="submit" value="Search">
</form>
<p> Welcome to Galaxy Book Store website, this website was created for people who really enjoy reading all sort of books.</p>
<p>Here you can find a huge amount of books.</p>
</body>
</html>
<footer>
<p> ® Galaxy Books Store</p>
</footer>][2]][2]