Instantly share code, notes, and snippets.
this will set the expiry date 1 month past the epoch.
I believe you forgot a time() call in the 3rd param like so:
setcookie( $v_username, $v_value, time() + 30 * DAYS_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
Additionally, the constant is singular: DAY_IN_SECONDS <----correct vs. DAYS_IN_SECONDS <---- incorrect