Declare the variables in the HTML page, insert some PHP where you pull the data from the database.
var quantity_in_stock_S = <?=$row['quantity_s']?>
var quantity_in_stock_M = <?=$row['quantity_m']?>
var quantity_in_stock_L = <?=$row['quantity_l']?>
In the PHP you should update the value in the database to the new value.
09-15-2013, 01:33 AM
Suggest you use AJAX to make a query to a PHP script that then reads the file/database and returns the data requested.