| 
<?php
 /**
 * @copyright copyright @ 2006 by Dick Munroe, Cottage Software Works, Inc.
 * @license http://www.csworks.com/publications/ModifiedNetBSD.html
 * @version 1.0.0
 * @package dm.cookie
 * @example ./example.php
 *
 * $Author: munroe $
 * $Date: 2006/03/26 14:53:51 $
 *
 * Edit History:
 *
 *  Dick Munroe ([email protected]) 25-Mar-2006
 *      Initial Version Created.
 */
 
 include_once('class.cookieArray.php') ;
 include_once('SDD/class.SDD.php') ;
 
 $theCookie = new cookieArray('test', time()+180) ;
 
 if (!$theCookie->exists())
 {
 $theCookie->setDataConstant(array('a' => 'one value', 'b' => 2)) ;
 $theCookie->save() ;
 header('Location: ' . $_SERVER['SCRIPT_URI']) ;
 }
 else
 {
 echo '$_COOKIE = ',SDD::dump($_COOKIE) ;
 echo '$theCookie = ',SDD::dump($theCookie) ;
 echo 'The cookie array data = ',SDD::dump($theCookie->getData()) ;
 }
 ?>
 
 |