Re: session_name("CCLTrolley")
| From: | John Taylor-Johnston | Date: | Mon, 03 Oct 2005 20:38:02 +0000 |
| Subject: | Re: session_name("CCLTrolley") | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223577@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
I took a look at your link and it appears to be working fine, though you haven't yet wired up the viewcart.phpWhen I create viewcart.php, what is the best way to extract and display the contents of $_SESSION['TrolleyContents'] ? Do I use my $sql value? or in my while statement where $mydata->RNum = $_SESSION['TrolleyContents'][??]] echo $mydata->RNum, $mydata->field1, $mydata->field2 Do I implode or explode $_SESSION['TrolleyContents']? John $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $sql = select * where RNum ... ? $news = mysql_query($sql1) or die ... while ($mydata = mysql_fetch_object($news)) { while $_SESSION['TrolleyContents'][??] echo $mydata->RNum - } echo implode( ',', $_SESSION['TrolleyContents'] ); gives me a comma delimited. http://ca3.php.net/explode http://ca3.php.net/implode