Updating the Quantity of an Item in a Shopper's Basket
This page will be a fairly simple processing script that deletes an item
based on which button is pushed.
The following PHP page should be called update_quantity.php and it should be uploaded to your firefox website.
<!-- update_quantity.php - updating the quantity of an item in a shopper's basket -->
// obtaining the id of the basket item the shopper wants to update
$id_basket_item = $_REQUEST["txt_id_basket_item"];
// connecting to the database on battcave.com
$link = mysql_connect($host, $user, $password);
// now we need to get all the basic info on the item
// in order to delete it from the basket_item table
$query_string = "UPDATE basket_item SET item_quantity = $txt_quantity WHERE id_basket_item = $id_basket_item";
mysql_db_query($db_name, $query_string, $link);
We now give some discussion of the code.