Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- $cookie_name = "user3";
- $cookie_value = "John Doe";
- setcookie($cookie_name, $cookie_value); // 86400 = 1 day
- if(!isset($_COOKIE[$cookie_name])) {
- echo "Cookie named '" . $cookie_name . "' is not set!";
- } else {
- echo "Cookie '" . $cookie_name . "' is set!<br>";
- echo "Value is: " . $_COOKIE[$cookie_name];
- }
- ?>
- </body>
- </html>
- $cookie_name = "user3";
- $cookie_value = "John Doe";
- setcookie($cookie_name, $cookie_value);
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement