Created
October 11, 2018 13:43
-
-
Save miclow/89cd4c77c3e890762edf72a1dca71559 to your computer and use it in GitHub Desktop.
PHP set cookie (user_is_admin) on page
This file contains 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 | |
$expire_time = time() + 60 * 60 * 24 * 180; | |
setcookie( 'user_is_admin', 'true', $expire_time, '/' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment