First of all, thanks to anyone who can help in advance. There's a cookie thing that's driving me crazy. I have a $id variable that's passed through URLs and basically determines what content to show in the page. What I need is that the $id variable is set in a cookie so that:
- every time I click on a URL that's passing the $id variable it is updated in the cookie
- everytime I click on a URL that's not passing any $id the content of the page is based on the cookie set.
The second requirement is basically met: once the cookie is set everything is fine. What I can't do is updating the cookie clicking on a link. I would try unsetting the cookie at every page and then setting it again, but then the second requirement wouldn't be met when I don't pass $id through the URL. Is there a way to update the cookie only when the variable passed through the URL is different then the one set in the cookie? Thans again for any help.