Guest User

Untitled

a guest
Jun 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.19 KB | None | 0 0
  1. /**
  2.  * Checks if the user is logged in
  3.  */
  4.  
  5. if($_SESSION['user_id'] == NULL) {
  6.     $_SESSION['login_error'] = "You need to login to view this page!";
  7.     die(header('Location: '.$site.'/'));
  8. }
Add Comment
Please, Sign In to add comment