Cookie is setting twice (duplicated)
- by Erik Larsson
I'm new to cookies, and im trying to set a cookie where to store the referrer (the org ref).
But when i try this function:
function do_it_cookie() {
// Check if cookie exists
if (isset($_COOKIE['ref'])) {
// It dose exist, do nothing or anything...
} else {
setcookie ('ref', $_SERVER['HTTP_REFERER'], time() + 60, '/');
…