Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $id_usuario = $_SESSION['user_id'];
- $usuario = $_SESSION['user_name'];
- setcookie($usuario, $id_usuario, time() + (86400 * 30), "/");
- if(!isset($_COOKIE[$usuario])) {
- echo "Cookie named '" . $usuario . "' is not set!";
- } else {
- echo "Cookie '" . $usuario . "' is set!<br>";
- echo "Value is: " . $_COOKIE[$usuario];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement