I\'m trying to set a PHP cookie to expire 1 Year from when the user logged in, and I\'m doing it this way:
setcookie(\"myCookie\",\'exampleUserName\',(365 *
The third param is the time in future that mean time() + time in seconds. Your 365 * 24 * 60 means 1971 ( 1970 + 1 ), this is in the past. Cookie in past will not be used - people set cookie to the past time to clear cookie. Do exactly like Shankar.
time() + time in seconds
365 * 24 * 60