Notice: Undefined variable: output in /hermes/bosnacweb09/bosnacweb09ax/b2779/ipw.almcomne/public_html/testcookie2.php on line 19
The cookie has not been set yet.
Click Here to set one.
------begin display of testcookie2.php code----
<?php
ini_set ("display_errors", "1");
error_reporting(E_ALL);
if (isset($_GET['set_cookie'])) {
setcookie("name", "value", time()+3600, "/");
}elseif (isset($_GET['unset_cookie'])) {
setcookie("name", false, time()-3600, "/");
unset($_COOKIE['name']);
}
if (isset($_COOKIE['name'])) {
$output .= "The cookie name with a value of " . $_COOKIE['name'] . "<br />
<a href=testcookie2.php>Click here to refresh the page</a>
<a href=testcookie2.php?unset_cookie=yes>Click here to unset it</a>";
}elseif (isset($_GET['set_cookie'])) {
header("Location: testcookie2.php");
}else {
$output .= "The cookie has not been set yet.
<a href=testcookie2.php?set_cookie=yes>Click Here</a> to set one.";
}
echo $output;
echo "<br /><br /><br />------begin display of testcookie2.php code----<br />";
highlight_file("testcookie2.php");
echo "<br />------end of testcookie2.php code---------------<br /><br />";
?>
------end of testcookie2.php code---------------