Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2. if (isset($_GET[‘cookiecheck’])) {
  3. if (isset($_COOKIE[‘testcookie’])) {
  4. print “Cookies are enabled”;
  5. } else {
  6. print “Cookies are not enabled”;
  7. }
  8. } else {
  9. setcookie(‘testcookie’, “testvalue”);
  10. die(header(“Location:. $_SERVER[‘PHP_SELF’] .
  11. “?cookiecheck=1));
  12. }
  13. ?>
  14. ---------------------------------------------------
  15.  
  16. <?php
  17. session_start();
  18. $_SESSION[‘accessTime’] = date(“M/d/Y g:i:sa”);
  19. print “This is page 1<br />;
  20. print “You accessed the application at:. $_
  21. SESSION[‘accessTime’];
  22. print<div><a href=\”page2.php\”>Continue to next page</
  23. a></div>;
  24. ?>
  25.  
  26. ---------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement