Sorry:
From the previous page, I posted (through a form) information which collected on this page using this:
$quantity = $_POST['quantity'];
$plu = $_POST['plu'];
$description = $_POST['description'];
$price = $_POST['price'];
$type = $_POST['type'];
$sessionid = $_POST['sessionid'];
$_SESSION['quantity'] = $quantity;
$_SESSION['plu'] = $plu;
$_SESSION['description'] = $description;
$_SESSION['price'] = $price;
$_SESSION['type'] = $type;
$_SESSION['sessionid'] = $sessionid;
These values are then inputted into the mysql database(successfully).
The contents of this database holding the inormation above is displayed in a table; one item per row using a loop function.
I have a text link with the following hyperlink next to each item displayed in a row of my table:
<a href="shopping_basket.php?action=remove&plu=<? $row['plu']; ?>">Remove</a>
...which calls the case here:
case 'remove':
remove();
break;
...diverting to the function:
function remove($plu){
mysql_query("DELETE FROM cart WHERE session_id = '".$_COOKIE[PHPSESSID]."' AND plu = '".$plu."'");
display();
}
I basically want to delete a record from the database, but according to the item. It possibly might be the relating to the record that I am having trouble doing.
Hope this is clearer.