Skip to content

Instantly share code, notes, and snippets.

@miclow
Created October 11, 2018 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miclow/89cd4c77c3e890762edf72a1dca71559 to your computer and use it in GitHub Desktop.
Save miclow/89cd4c77c3e890762edf72a1dca71559 to your computer and use it in GitHub Desktop.
PHP set cookie (user_is_admin) on page
<?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