PDA

View Full Version : How to create a grey out popup advertising image when visiting homepage for first time?


mampwamp2
08-14-2012, 07:34 AM
How to create a grey out popup advertising image when visiting homepage for first time? it also need a close button to close the image.

effect will similiar with this "Basic Modal Dialog" on this page http://www.ericmmartin.com/projects/simplemodal-demos/

edbr
08-14-2012, 10:31 AM
set a cookie, then check if cookie set on a return visit to determine if first visit

down vote


For more information see the docs.

<?php

if (!isset($_COOKIE['visited'])) { // no cookie, so probably the first time here
setcookie ('visited', 'yes', time() + 3600); // set visited cookie


}

?>