You can't stop the user editing a cookie on the client side. What you have to do is only use cookies to store things which aren't security critical.
When using cookies to store critical information, it is normal practice to either:
- Store a long unguessable ID instead which refers to a row in a DB or a file (which is what session does by default)
- OR cryptographically sign the data you wish to store in the cookie
Also, don't use barewords as literal strings, this generates a notice (which should of course be seen loudly) and will conflict with future PHP reserved words.
Mark