I'm am experimenting with cookies for the first time and I don't think I'm understanding this or my code is doing something loopy. Someone mind helping me get back on the right path?
I keep re reading the php.net help but i think my mind is mush now :/
$currentTime = strtotime("now");
$popup_exp = strtotime("+1 hour");
if (!isset($_COOKIE['popup_timer'])) : //does cookie exists? if not, make it
setcookie("popup_timer", $currentTime);
endif;
if( ($popup_exp > $_COOKIE['popup_timer']) ):
//show my popup
endif;