Login   Register  
PHP Classes
elePHPant
Icontem

File: cookie_delete.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Brian Moon  >  SiteCookie  >  cookie_delete.php  >  Download  
File: cookie_delete.php
Role: Example script
Content type: text/plain
Description: Show how to destroy the cookie
Class: SiteCookie
Author: By
Last change:
Date: 2003-05-29 05:40
Size: 414 bytes
 

Contents

Class file image Download
<?php

    
// You can destroy the entire cookie two ways.
    //  1. set the expire time in the past
    //  2. call the clear() method and then the set() method.

    // Include the Class
    
include "SiteCookie.php";
    
    
// Create a local object
    
$SiteCookie=new SiteCookie("test_cookie"time()-86400);
    
    
// Clear all values
    
$SiteCookie->clear();

    
// Set the cookie
    
$SiteCookie->set();
    
?>