WilliamMute
Programmer
- Jan 4, 2006
- 117
Hi all,
I am trying to write a basic shopping cart script and seems to be loosing it in the process.
Basically, I use sessions, two tables ( product & basket).
I am now writting a query to display the content of the basket table belonging to a matching session id.
slq: $query_Recordset1 = "SELECT product_id, quantity, id FROM springrisecart WHERE session = $cart_id";
Note I have already assigned
<?php
if(!isset($HTTP_COOKIE_VARS['cart_id'])) {
$cart_id = md5(uniqid(rand()));
setcookie("cart_id", $cart_id, time() + 14400);
} else {
$cart_id = $HTTP_COOKIE_VARS['cart_id'];
}
?>
ERROR on Browser:
Unknown column '2bc2e65f7709880e5b8c0ac79df6f0ae' in 'where clause'
Any suggestions what is wrong Please?
Thanks so much
I am trying to write a basic shopping cart script and seems to be loosing it in the process.
Basically, I use sessions, two tables ( product & basket).
I am now writting a query to display the content of the basket table belonging to a matching session id.
slq: $query_Recordset1 = "SELECT product_id, quantity, id FROM springrisecart WHERE session = $cart_id";
Note I have already assigned
<?php
if(!isset($HTTP_COOKIE_VARS['cart_id'])) {
$cart_id = md5(uniqid(rand()));
setcookie("cart_id", $cart_id, time() + 14400);
} else {
$cart_id = $HTTP_COOKIE_VARS['cart_id'];
}
?>
ERROR on Browser:
Unknown column '2bc2e65f7709880e5b8c0ac79df6f0ae' in 'where clause'
Any suggestions what is wrong Please?
Thanks so much