ok but i need seperate buttons to select an item and put it into a cart.
so select * from shop;
shows me the whole shop
then say next to milk i need a button to drop that into the cart. At the moment it will only let me select 1 item and no others.
hence; here is the process.
$sql="INSERT INTO order_line (item, price, order_id) SELECT shop.item, shop.price, ".$tran_ID." FROM shop WHERE shop.item='milk'";
//$sql="insert into order_line (order_id) values ($tran_ID)";
if (!mysql_query($sql,$connection)) {
echo "Error cannot add items..Please Contact the Administrator";
echo "<BR>Back to <A HREF=\"c_order2.php\"> Stationay Order</A>";
exit;
} else {
# insert OK inform user
echo "Table updated [".mysql_affected_rows()."] item(s) added<BR>";
echo "<B>Items added to basket...</B><BR>";
echo "$item £$price";