I am trying to set a cookie but it doesn't seem to work. Here is the script:
<?php track_vars?>
<?php setcookie("userid",$userid,time()+9999999999999999999999,"/",".ekkocom.com",0);
echo "The final step is complete. <a href=\"http://www.ekkocom.com\">CLICK HERE</a> to return to the Epic Lands main page." ; ?>
When the script is run it appears to work, no errors or anything, but when I get the cookie with a different script nothing happens. And I looked on my comp for the cookie and could not find it. BTW.. the site setting I have is because I do not know how to make the cookie never expire.
The script before this one send data to a database and then the user clicks a form button, like this:
<?php $userid = md5(uniqid ("")); ?>
<form method="post" action="http://www.ekkocom.com/scripts/colorswitch/setcookie.php">
<input type="hidden" name="userid" value="<?php echo "$userid";?>">
<input type="submit" value="Finish the Change!">
</form>
Please help! this is pretty urgent. I need to get this done so I can begin the construction of other parts of the site.