Cookie Setting
Posted: Wed Aug 13, 2003 6:12 pm
i've been trying to create a page that will stamp a cookie and redirect to our home page
cookie name: ezrefer
page name
ie: http://ww.anydomain.com/ezb.php?ezrefer=REFERCODE
REFERCODE is the code i want to stamp for this user depending on where they came from. so REFERCODE will change all the time.
but when i type the following code, no cookie is set because I HAVE TO put a value for $name, correct?
basically i don't want the cookie "ezrefer" to always be a static value.
is this possible?
<?php
$today = date("F j, Y, g:i a");
$name = "";
setcookie("ezrefer-$today",$name,time()+31536000,"/", ".ezboard.com");
$URL="http://www.ezboard.com";
header ("Location: $URL");
?>
thanks in advance...
- Randy -
cookie name: ezrefer
page name
ie: http://ww.anydomain.com/ezb.php?ezrefer=REFERCODE
REFERCODE is the code i want to stamp for this user depending on where they came from. so REFERCODE will change all the time.
but when i type the following code, no cookie is set because I HAVE TO put a value for $name, correct?
basically i don't want the cookie "ezrefer" to always be a static value.
is this possible?
<?php
$today = date("F j, Y, g:i a");
$name = "";
setcookie("ezrefer-$today",$name,time()+31536000,"/", ".ezboard.com");
$URL="http://www.ezboard.com";
header ("Location: $URL");
?>
thanks in advance...
- Randy -