toggle between login and logout buttons php code example
Example: toggle between login and logout buttons php
<?php if(isset($_SESSION['id'])){ ?>
<a class="link" href="logout.php" style="text-decoration:none">logout</a>
<?php }else{ ?>
<a class="link" href="login.php" style="text-decoration:none">login</a>
<?php } ?>