Welcome to WebmasterWorld Guest from 54.196.217.43

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

set get COOKIE

     
2:51 am on Feb 11, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 13, 2009
posts:46
votes: 0


how to set and get COOKIE on a single php file
i am doing some thing like
setcookie('test',test,time() + (100),"/",'.example.com');
$test =$_COOKIE['test'];
echo $test;

but not worked and after refreshing one time its works any idea plz

1:12 pm on Feb 11, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


A quick search will turn up some answers for you ...

How can I test whether the browser accepts cookies in php? [webmasterworld.com]
PHP cookie on first page access [webmasterworld.com]