Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
° When there is a post, you set 2 times the same cookie. Why ?
° The 5th parameter of setcookie() is the domain, so put a domain in it, not an url.
Quote:
|
The domain that the cookie is available. To make the cookie available on all subdomains of example.com then you'd set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com will make the cookie only available in the www subdomain
|
Remember that you cannot access the content of a cookie you setted in the same page load.
You need to reload the page to read the content of the cookie.
Here, after having set the value of the cookie, you access $_COOKIE[], which will hold the old value, and not the new one.
Could be your problem.
__________________
Only a biker knows why a dog sticks his head out the window.
|