PHP Classes

File: cookie_get.php

Recommend this page to a friend!
  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: 19 years ago
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";

?>

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