1. Computing

PHP Login Script

By , About.com Guide

7 of 7

Logout Page
 <?php 
$past = time() - 100;
//this makes the time in the past to destroy the cookie
setcookie(ID_my_site, gone, $past);
setcookie(Key_my_site, gone, $past);
header("Location: login.php");
?>
All our logout page does is destroy the cookie, and then direct them back to the login page. We destroy the cookie by setting the expiration to some time in the past.
Related Video
Basic PHP Syntax
Using PHP With HTML
  1. About.com
  2. Computing
  3. PHP / MySQL
  4. Step By Steps
  5. Login PHP Script - Login PHP - Free Login PHP Script

©2013 About.com. All rights reserved.