Posted by John Taylor-Johnston on 10/02/05 07:37
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
Navigation:
[Reply to this message]
|