Forum Moderators: coopster
Basically when a customer clicks add to cart the next page displays that product information from the database.
Now if they click another product that again is displayed under the first product.
Now I want both of them products ids to be outputted to a text field but the problem is what ever product is put in last is taking over the varible.
the code starts like this.
$sql = 'SELECT * FROM products WHERE id = '.$id;
$result = $db->query($sql);
$row = $result->fetch();
$ig = '$image';
extract($row);
I looked at this again i was not putting it before opening bracket.
That just stops outputting the whole varible. just shows 1st product in varible.
--------
trying out the row[] stops any data going through what so ever.
There is also foreach ($contents as $id=>$qty) if that makes any difference.
The problem im having is that when the order are coming through all I can see is how much the total is which is no good.