Back to Mal's forms page
<<< Clicking on this logo will return you to my Mal's Forms home page.

If you have a one off or limted number of a product, once the item is added to the cart the product quantity value is reduced by one, so if you start with a value of one in your text file and that item is sent to the cart, then Sorry we are currently out of stock is shown on the page.

This can be added to your one off or limited number of stock page in less than five minutes.

You can use the same scripts on an unlimited number of products, an unlimited number of forms, an unlimited number of forms per page.

If you look in the address bar of your browser, the page extension is .php and not .htm or .html, this is because the scripts are built using PHP. You do not need a database or anything except the tiny (1-2 bytes) text file, my external script and your web page.

A program, which is inbuilt into this page, calls on a unique named text file e.g. product-name.txt (CHMOD to 777 so it is writeable) in the same directory as your page with the content of the product quantity number (1, 2, 99 etc), once the buyer has clicked the button to send the order to Mal's, the text file is re-written and reduced by a value of one.

All you need to do is add my PHP program to your page and add an external PHP page, all code and instructions are emailed to you.

Place <?php Read(); ?> or <?php ReadMultiple(); ?> in the text line as I have done to show your viewer the quantity you have in stock of the product.

With the multiple number in stock script, we have an additional script, this script reads the text file and, if the number equals zero, then a zero is given to the qty value, otherwise a value of one is the qty used.

If the buyer backs out/deletes the product from Mal's or does not pass the payment processor, then the quantity value of the order is not added back to the text file.

These scripts are not free, please make a donation of at least $40/£25 for each script. Let me know by email if you need the multiple or single product script.

Comments from users: "Thanks a million, happy dance here." "I've managed to get it to work using your exact instructions and it works brilliantly."

Limited number in stock product, stock level 9 

Below we have a single quantity product. Once the order is passed to Mal's, the data file returns a zero and no more orders can be placed for this product.

To stop further orders being placed, in the qty value field place the same code as you use for the 'Stock level' this will mirror the stock level value, either a 1 or a 0.

Only one in stock product, stock level 0 Sorry we are currently out of stock.