thanks
i have tried to implement that with the script but i need some help to make it work
function display_cart($cart, $change = true, $images = 1)
{
// display items in shopping cart
// optionally allow changes (true or false)
// optionally include images (1 - yes, 0 - no)
global $_SESSION;
echo '<table border = 0 width = 100% cellspacing = 0>
<form action = show_cart.php method = post>
<tr><th colspan = '. (1+$images) .' bgcolor="#cc66cc">Item</th>
<th bgcolor="#cc66cc">Price</th><th bgcolor="#cc66cc">Quantity</th>
<th bgcolor="#cc66cc">Total</th></tr>';
//display each item as a table row
foreach ($cart as $code => $qty)
{
$product = get_product_details($code);
if ($qty < 0)
{
echo '';
}
else
echo '<tr>';
if($images ==true)
{
echo '<td align = left>';
if (file_exists("images/$code.jpg"))
{
$size = GetImageSize('images/'.$code.'.jpg');
if($size[0]>0 && $size[1]>0)
{
echo '<img src="images/'.$code.'.jpg" border=0 ';
echo 'width = '. $size[0]/3 .' height = ' .$size[1]/3 . '>';
}
}
else
echo ' ';
echo '</td>';
}
echo '<td align = left>';
echo '<a href = "show_product.php?code='.$code.'">'.$product['description'].'</a> from '.$product['product_group'];
echo '</td><td align = center>£'.number_format($product['price_each'], 2);
echo '</td><td align = center>';
// if we allow changes, quantities are in text boxes
if ($change == true)
echo "<input type = text name = \"$code\" value = \"$qty\" size = 3 maxlength='3'>";
else
echo $qty;
echo '</td><td align = center>£'.number_format($product['price_each']*$qty,2)."</td></tr>\n";
}
// display total row
echo '<tr>
<th colspan = '. (2+$images) ." bgcolor=\"#cc66cc\"> </td>
<th align = center bgcolor=\"#cc66cc\">
".$_SESSION['items']."
</th>
<th align = center bgcolor=\"#cc66cc\">
£".number_format($_SESSION['total_price'], 2).
'</th>
</tr>';
// display save change button
if($change == true)
{
echo '<tr>
<td colspan = '. (2+$images) .'> </td>
<td align = center>
<input type = hidden name = save value = true>
<input type = image src = "images/layout/save-changes.gif"
border = 0 alt = "Save Changes">
</td>
<td> </td>
</tr>';
}
echo '</form></table>';
}