Form to Increase price by percentage


I am building a web price updates page for an e-commerce website, and would like to create a form where I can update products within the product group selected(via a drop down menu), by any percentage that is input by the user. There are 200 different product groups all containing a list of products that are stored within a database that is already connected to the webpage and displays a list of products, web price etc. I would like to be able to select a particular group from the drop down menu, then apply the percentage increase, that the user has input into the form, to the group of products selected.

Hope this makes sense any help would be greatly appreciated.


I have now got slightly further with this and have created an update form for this. The update form currently ouputs the new web price as a 40% increase as I have set it to do this. I would like a way to have a value input by the user (as the percentage increase) in place of the calculation for 40% percent increase so that it can be any number from the text box.

if ((isset($_POST[“MM_update”])) && ($_POST[“MM_update”] == “form1”)) {
$updateSQL =
sprintf(“UPDATE ProductsUpdated
SET Web_Price=round((Web_Price)*1.40,2) // This is where I need my calculation for any percentage increase
WHERE SageGroup=’$sgroup’”,
GetSQLValueString($_POST[‘Web_Price’], “text”),
GetSQLValueString($_POST[‘SageGroup’], “text”));