oke than do this..
you want to have this cookie set.
setcookie('test','test',time()+120);
I used
Code: Select all
<?
$string_name = "test";
$string_value ="test";
$expiry_info = time() +120;
setcookie($string_name, $string_value, $expiry_info);
?>
my results
test
test
localhost/cookie/
0
3665616768
29614592
2474336768
29614592
*
cookie was located in (win2k machine )
C:\Documents and Settings\Administrator\Cookies
and named administrator@cookie[1]
my results displaying the cookie
you ate a test cookie!
with code
Code: Select all
<?
//$string_name = "test";
//$string_value ="test";
//$expiry_info = time() +120;
//setcookie($string_name, $string_value, $expiry_info);
if (isset($_COOKIE['test'])) {
print "you ate a $_COOKIE[test] cookie!";
}
?>
Set cookie time to like 5 minuuts and than see if cookie has been set.
maby youre waiting to long.. 120 seconds is gone soon enough