I want to implement a simple link that when clicked, deletes the item from the basket.
How can I do this?
<tr>
<th>Product</th>
<th>Description</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</tr>
and
$paypalBasket[] = array($product['common_name'], $item['prod_type'], $product['price'], $item['quantity'], number_format($line_cost, 2));
?>
<tr>
<td><?=$product['common_name'];?></td>
<td><?=$item['prod_type'];?></td>
<td><?=$product['price'];?></td>
<td><input type='text' name='quantity[]' value='<?=$item['quantity'];?>' size='2' /></td>
<td>£<?=number_format($line_cost, 2);?></td>
</tr>
You can point the link href to a script and pass in the id of the item via a query string. Something like this.
Then in that script do any necessary validation checks, delete the item then re-show them the shopping cart.