Defining cookie name in one place

I’m trying to define my cookie name in one place (config.php) so that if i need to change the name i only have to do it once. I have:

define('THEME_COOKIE','test');

I am then trying to use this string constant as the name of my cookie, however it is not working…

Read More
setcookie(THEME_COOKIE, base64_encode(json_encode($user)), time() + (86400 * 30), '/', '', false, true);

The cookie name is just showing up as THEME_COOKIE instead of test..

Any ideas?

Related posts