Hi, im having a problem with deleting a cookie. when i set the cookie i set it for time()+3600 to set it for an hour... when i delete i set time to time()- 24*60*60 but cookie not deleting... i tried 0 which should drop cookie when browser closes n still nothing... i am now clueless as to whats going on...
Delete cookie
Collapse
X
-
Originally posted by pmbguy View PostHi, im having a problem with deleting a cookie. when i set the cookie i set it for time()+3600 to set it for an hour... when i delete i set time to time()- 24*60*60 but cookie not deleting... i tried 0 which should drop cookie when browser closes n still nothing... i am now clueless as to whats going on...
PHP Code:setcookie('user', 'someone', time() - 2592000, '/');
if you wana to let cookie expireswhen the browser is closed, skip the time() param
PHP Code:setcookie('user', 'someone');
Last edited by softwarefreak; 23.04.12, 06:55.I need some facebook likes, can you please help me
http://facebook.com/softwarefreakin
I noticed social media is really powerful
Well DONE is better than well SAID
-
Originally posted by pmbguy View Postyou mean something like this?
$timeout = time() - (60 * 24 * 60 * 60);
setcookie ("uvw999", "", $timeout "/");
PHP Code:$expire = time() - 5184000;
setcookie ("uvw999", "somedata", $expire);
I need some facebook likes, can you please help me
http://facebook.com/softwarefreakin
I noticed social media is really powerful
Well DONE is better than well SAID
Comment
-
Originally posted by pmbguy View Postyou mean something like this?
$timeout = time() - (60 * 24 * 60 * 60);
setcookie ("uvw999", "", $timeout "/");
Code:$till = 5184000; setcookie("key", "var", $till);
Code:$till = 100; setcookie("key", "gone", $till);
Last edited by shushant; 29.04.12, 16:18.
Comment
Comment