While coolspot mentioned "$cookie" is your problem... it is not. Actually, the problem is the one before it, where you use '$cookie'.

There is no problem with using double quotes around text, though in a function (and if the variable is the only value), it is not necessary to put quotes on the cookie. Same goes for an array element. "$cookie" is perfectly legal in php.

However, single quotes are not treated the same as double quotes-- ie. the data inside the quotes does not get evaluated for variables. You'll have to change the $_COOKIE['$cookie'] to double quotes, or take out the quotes altogether


... Also make sure you're setting the cookie BEFORE the headers are sent, which means before any data is sent-- or it won't work. But PHP should give you an error for that.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"