Login   Register  
PHP Classes
elePHPant
Icontem

File: cookie_get.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_get.php  >  Download  
File: cookie_get.php
Role: Example script
Content type: text/plain
Description: Example of how to get the contents of a SiteCookie
Class: SiteCookie
Author: By
Last change:
Date: 2003-05-23 00:36
Size: 500 bytes
 

Contents

Class file image Download
<?php
    
// Include the Class
    
include "SiteCookie.php";
    
    
// Extract all the variables out of the saved cookie
    // into their own 'cookies'
    
SiteCookie::extract("test_cookie");

    
// Display the values found
    
echo "<BR> Values of variables retrieved from test_cookie" ;
    echo 
"<br> Name: ";
    echo 
$_COOKIE['namefirst']; 
    echo 
" ";
    echo 
$_COOKIE['namelast'];
    echo 
"<br> Number: ";
    echo 
$_COOKIE['number'];
    echo 
"<br> Time: ";
    echo 
$_COOKIE['time'];
    
    echo 
"<br><br>END";

?>