Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- session_destroy();
- header('location:Login.php');
- $cookie_user = $_SESSION['username'];
- $cookie_password = $_SESSION['password'];
- $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
- setcookie($cookie_user, $cookie_password, time() + (86400 * 30),"/", $domain);
- if(!isset($_COOKIE[$cookie_user])){
- echo "Cookie Username '" . $cookie_user . "' is not set!";
- }
- else{
- echo "Cookie Username '" . $cookie_user. "' is set!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement