On Thu, 13 Sep 2001 14:22, David Robley wrote:
> > Here's what's going on.
> > ========================================================
> >
> > $connection = mysql_connect($server, $user, $pass);
> > mysql_select_db($db);
> >
> > $query = "select * from shoppingcart where PHPSESSID = '$PHPSESSID'";
> > $result = mysql_query($query,$connection);
> > $numrows = mysql_num_rows($result);
> >
> > $count = 0;
> >
> > while ($count < $numrows){
> > $cartitem = mysql_fetch_array($result);
> > $productquery = "select * from products where productid =
> > '$cartitem[productid]'"; $productresult = mysql_query($productquery);
>
> Ah. Should that be $cartitem[$productid] ??? And perhaps better
> written as
>
> $productquery = "select * from products where productid =
> '" . $cartitem[productid] . "'";
>
Oops - didn't read that closely enough.
$productquery = "select * from products where productid =
'" . $cartitem["productid"] . "'"
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
I'd love to, but the man on TV said to stay tuned.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]