shah_ankitb Posted May 8, 2007 Share Posted May 8, 2007 I am setting the value of cokkies for 10 seconds after that i will remove it for 5 seconds.As per below code.cookie.php <?php setcookie("user", "Alex", time()+5);echo $_COOKIE["user"];// A way to view all cookiessetcookie("user", "Alex", time()-5);?><html><body></body></html> When I run this code in IE 6.0, then as per the rule i got the entry in my OS Drives ex. path sayC:\Documents and Settings\pc_no\Cookies\file_name.txt So my Question Is When I set the cookie after that exactly i am removing that.So as per i think the Entry of C drives Cookies Folder would be deleted, But it Should'nt.I would like to also know how to unset / expire the cookie with example if possible. I am also go through to the w3school's Set Cookie. But I Couln't Get It. Can Anybody Explain me Exact meaning of Deleting A Cookie. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 9, 2007 Share Posted May 9, 2007 You can essentially do one thing on a cookie per page. Set the cookie on one page, view the cookie on another page, and delete it on a third page. Since cookies are sent in the request and response headers, you will not have access to a cookie that you set on the same page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.