PHP Classes

File: cookie_delete.php

Recommend this page to a friend!
  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: 19 years ago
Size: 414 bytes


Class file image Download

// 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

// Set the cookie

For more information send a message to info at phpclasses dot org.