Guest User

Untitled

a guest
Jul 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $arr = explode('/', $_SERVER["REQUEST_URI"]);
  4. if( count($arr) > 2 )
  5. {
  6. $name = $arr[2];
  7. if($name == 'clear')
  8. {
  9. session_destroy();
  10. }
  11. elseif( count($arr) > 3)
  12. {
  13. $value = $arr[4];
  14. $_SESSION[$name] = $value;
  15. }
  16. else
  17. {
  18. unset($_SESSION[$name]);
  19. }
  20. }
  21. echo '<html>';
  22. echo '<head>';
  23. echo '<script src="THISENDSUPINSESSION.js"></script>';
  24. echo '</head>';
  25. echo '<body>';
  26. echo var_export($_SESSION,true);
  27. echo '</body>';
  28. echo '</html>';
Add Comment
Please, Sign In to add comment