Created
September 24, 2015 16:53
-
-
Save midoriberlin/192a02e2f8a7b9fac72b to your computer and use it in GitHub Desktop.
Setting a cookie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'setting_my_first_cookie' ); | |
function setting_my_first_cookie() { | |
setcookie( $v_username, $v_value, 30 * DAYS_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment