karlokokkak

Untitled

Apr 20th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.     error_reporting(E_ALL);
  3.     ini_set("display_errors", 1);
  4.     session_start();
  5.    
  6.     if (isset($_SESSION['Mobile'])) {
  7.         echo $_SESSION['Mobile']  . " Session <a href='logout.php'>logout</a>";
  8.     }else if(isset($_COOKIE['Mobile'])){ //when user is logged with cookies
  9.         echo $_COOKIE['Mobile']  . " cookie <a href='logout.php'>logout</a>";
  10.     }else{ //when user is not loggedin
  11.         header("Location: login.php");
  12.         exit();
  13.     }
  14. ?>
  15. Welcome <?php echo $Mobile;?>
Advertisement
Add Comment
Please, Sign In to add comment