For some reason, I cannot unserialize my cookie.
The output is ALWAYS blank after unserialization.
In test.php:
[code=php] <?
$allcookie = "CHECK";
setcookie("mycookie", serialize($allcookie),time()+(31449600*20));
echo "<A HREF=\"test2.php\">Test2</A>";
?>[/code]
In test2.php:
[code=php] <?
$cookie_data = unserialize($HTTP_COOKIE_VARS["mycookie"]);
echo $cookie_data;
?> [/code]
The above is the only code in each PHP file.
test2.php's output is nil -- totally blank.
I'm able to output $HTTP_COOKIE_VARS["mycookie"] in its serialized state without a problem.
And for further reference, the following will output just fine:
PHP:
$all = "CHECK";
$serialcook = serialize($all);
echo unserialize($serialcook);
PHP Version 4.3.9
Thank you for your help!