Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_GET[‘cookiecheck’])) {
- if (isset($_COOKIE[‘testcookie’])) {
- print “Cookies are enabled”;
- } else {
- print “Cookies are not enabled”;
- }
- } else {
- setcookie(‘testcookie’, “testvalue”);
- die(header(“Location: “ . $_SERVER[‘PHP_SELF’] .
- “?cookiecheck=1”));
- }
- ?>
- ---------------------------------------------------
- <?php
- session_start();
- $_SESSION[‘accessTime’] = date(“M/d/Y g:i:sa”);
- print “This is page 1<br />”;
- print “You accessed the application at: “ . $_
- SESSION[‘accessTime’];
- print “<div><a href=\”page2.php\”>Continue to next page</
- a></div>”;
- ?>
- ---------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement