I need to destroy the session cookie as the value is used as the ID in a shopping cart. On returning to the site, the cart still contains the items you just bought. Ive tried destrying the session and using setcookie() but it doesn't seem to have an affect. Any suggestions?
Rene
have you tried sesssion-destroy()?
Yep, it only empties out the session it seems. I need to remove the session from existence. Thanks for your help.
by session do you mean the session id? if so, php automatically garbage collects session_ids periodically. the best thing for you to do is:
session_start(); session_destroy(); $_SESSION = array();
Your the man!
Cheers
uh, you are welcome 🙂