Why can I not set a cookie in Concrete5?

Permalink
Hello,

I am trying to set a cookie in Concrete5 but is always cleans it out.

How can I set a cookie?

cgsmith
 
goldhat replied on at Permalink Reply
Maybe you could post your code for how/where your currently trying to set the cookie? I haven't tried setting cookies in C5 myself, but I've set sessions and found that took a bit of study first. Have you tried just var_dump( $_COOKIE ) to see what is set already or looking at the C5 cookies in your browser?
ronyDdeveloper replied on at Permalink Reply 1 Attachment
ronyDdeveloper
Generally I use a library to set cookie. I'm attaching a zip file which contains a jquery cookie library js. You need to include this into your header. Then follow the instructions on below link:
https://github.com/carhartl/jquery-cookie...

By which you will be able to set the cookie. I've used it several times & its very reliable.

Rony