Hey y'all. Wondering if someone can help me out. I've searched high and low and cannot find a solution to my problem. I am trying to get a cookie to work. As long as I stay in the browser and don't shut it down, it works, but if I exit the browser and then open it again, the cookie does not work. Also, if I switch browsers, the cookies is not set. It seems to me that I'm not passing a valid argument for "expire." Here is the code I'm using:
$time = mktime()+600;
$date = date("l, d-M-y H:i:s", ($time));
$date .= " GMT";
$cookie_name = "temp";
$cookie_value = "on";
setcookie($cookie_name, $cookie_value, $date, "/", "", 0);
Any help would be great.
Thanks,
Craig