[SOLVED] Cookie question
Posted: Mon Jul 26, 2004 11:59 am
Hello everyone.
I have a question regarding a cookie. When a cookie is set, using setcookie() in PHP, and an expiry date is set (to one year from now), the data in the cookie is easily read by PHP and passed to whereever it needs to be passed. For example:
Now, my question is, what happens when I do something like this?
After this command is run, if I do a check on the cookie (such as if (isset($_COOKIE['cookiename']))), should that condition still pass? In other words, is the cookie still set?
Thanks!
I have a question regarding a cookie. When a cookie is set, using setcookie() in PHP, and an expiry date is set (to one year from now), the data in the cookie is easily read by PHP and passed to whereever it needs to be passed. For example:
Code: Select all
<?php setcookie("cookiename", $sessid, time()+60*60*24*30*12, "/"); ?>Code: Select all
<?php setcookie("cookiename", "", time()-3600); ?>Thanks!