Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 } ?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #toggle #login #logout #buttons #php
ADD COMMENT
Topic
Name
1+4 =