You are here: Re: [PHP] session_name("CCLTrolley") « PHP « IT news, forums, messages
Re: [PHP] session_name("CCLTrolley")

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация