Re: session_name("CCLTrolley")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Cummings wrote:

<?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
if( !isset( $_SESSION['TrolleyContents'] ) )
{
$_SESSION['TrolleyContents'] = array();
}
// Add new entry.
if( isset( $_POST['AddToTrolley'] ) )
{
$_SESSION['TrolleyContents'][$_POST['AddToTrolley']] = $_POST['AddToTrolley']
}
echo implode( ',', $_SESSION['TrolleyContents'] );
?>

I've never been very good getting my head around arrays.
Then how do I check to know if $mydata->RNum is in $_SESSION['TrolleyContents'] ?
Thanks for your patience.
John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux