Guest User

Untitled

a guest
Apr 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if(!session_is_registered(`name`))
  4. {
  5. header("location: login.php");
  6. }
  7. $user = session_is_registered(`name`);
  8. $pass = session_is_registered(`pwd`);
  9.  
  10. echo "<h3>" . $user . "</h3>";
  11. ?>
  12.  
  13. session_start();
  14. $_SESSION['blah']= "blah blah";
  15. if(isset($_SESSION['blah']) && !empty($_SESSION['blah'])) {
  16. echo 'Set and not empty, and no undefined index error!';
  17. }
  18.  
  19. session_start();
  20. if(array_key_exists('blah',$_SESSION) && !empty($_SESSION['blah'])) {
  21. echo 'Set and not empty, and no undefined index error!';
  22. }
Add Comment
Please, Sign In to add comment