Hi there,
I've created a modal window advert that appears in the home page. I was wondering if anyone could tell me how I can set a cookie to record whether or not its been seem and then only show the pop-up if it hasn't already been seen.
Any tips or pointers would be greatly appreciated.
Thanks in advance!
-
☆ A M B ☆
- 2,475 Posts
Fancybox, thickbox, lightbox, etc. are all javascript/css formatting bits, so inherently, they can not offer cookies at all. Really your question comes down to using PHP to set and read persistent data -- cookies are one option and sessions are another. This should revolve around a simple if statement while reading a cookie: if not set, then display the html and set the cookie, otherwise do nothing.