hi everyone,
i am on cookies, i am generating an an random number which can be used as name for the cookie and the value for the cookie will be another value.
but the trouble is the cookie is not getting set. please tell mi how do do it. below given is the code which i am using to test this:
"<?php
$num = 5;
srand ((double) microtime() * 1000000);
$rndval = rand();
setcookie($rndval,$num,'','/','localhost',0);
echo 'Random Value ',$rndval;
$cok = $HTTP_COOKIE_VARS[$rndval];
echo ' | Cookie Value ', $cok;
?>"
and the output which i am getting is :
"Random Value 6838 | Cookie Value "
please help mi.
thxn
piyush