kobinatorke

page.php

Nov 25th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.  
  4.     if(isset($_SESSION['id'])) {
  5.         $username = $_SESSION['username'];
  6.         $userId = $_SESSION['id'];
  7.     } else {
  8.         header('Location: index.php');
  9.         die();
  10.     }
  11. ?>
  12.  
  13. <!DOCTYPE html>
  14. <html>
  15. <head>
  16.  
  17.     <title> / </title>
  18.  
  19. </head>
  20. <body>
  21.  
  22.     <h1>Successfully logged in!</h1>
  23.  
  24.     <form methode="POST" action="logout.php">
  25.         <input type="submit" name="logout" value="Logout" />
  26.     </form>
  27.  
  28. </body>
  29. </html>
Add Comment
Please, Sign In to add comment