I have a html page:

HTML Code:
<form action="stock.php" method="post">
S:<input value="remove" name="removeWS" type="submit" /> </br>
M:<input value="remove" name="removeWM" type="submit" /> </br>
L:<input value="remove" name="removeWL" type="submit" /> </br>
</form>
a javascript page:

Code:
var quantity_in_stock_S = 2
var quantity_in_stock_M = 2
var quantity_in_stock_L = 1
I am wanting a php page to make do
Code:
1 - var quantity_in_stock_S
when removeWS is clicked:

PHP Code:
<?php

    $f 
fopen("1stock.js""a+");
        
fwrite(...); /* 1 - quantity_in_stock_S*/
That kind of idea...