Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php if ($gebruiker->checkLogout()) { ?>
  2. <li><a href="logout.php">Loguit</a></li>
  3. <?php } ?>
  4.  
  5. function checkLogout(){
  6. if (isset($_SESSION['login'])) {
  7. return true;
  8. }else {
  9. return false;
  10. }
  11. }
  12.  
  13. ---------------
  14. Logic for login
  15. ---------------
  16.  
  17. ------------
  18. Menu Section
  19. ------------
  20.  
  21. <?php if($_SESSION['login'])
  22.  
  23. echo <a href="logout.php">Loguit</a></li>';
  24. else{
  25. echo '<li><a href="login.php">Login/Registreren</a></li>';
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement