i looked all over the manual and i didn't find out how you can retrieve a cookie.....
let's say for instance
if($action == "") {
//if action is empty, set action to setcookie
header("Location: $PHP_SELF?action=setcookie");
} elseif ($action == "setcookie") {
$value = "The cookie was successfully retrieved";
//$value was set, omsert it in a cookie
setcookie("Testcookie", "$value", time()+3600);
//echo link to retrive it
echo "Your cookie was set, <a href=$PHP_SELF?action=getcookie>click here</a> to retrieve your cookie";
} elseif ($action == "getcookie") {
echo "The cookie you retrieved is:<br>";
//would you just do the name of the cookie like so?
//or can i use $value at anytime after it's been set?
echo $Testcookie;
} else {
//action isn't null nor is it getcookie or setcookie therefor
//display an error
echo "Error in script";
}
how do i get my $value to display? i know it is being set, becuase i checked my cookie after running my script...
thanks!