I am learning about setting cookies, and I have this script that doesn't appear to be passing the cookie, i checked the cookies in the browser properties. Can anyone see why it isn't passing?
Code: Select all
<?
session_save_path("/.");
session_start;
if (!isset($id)) {
srand((double)microtime()*1000000);
$randval = rand();
setcookie("id",$randval,time()+14400,"/","/.",0);
}
$id = $HTTP_COOKIE_VARS["id"]
?>feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]