Hi DP members, Just implement payment gateway system for one of my projects, unfortunately i need to change invoice number manually every time. How i can do it automatically? Is there any script that can help me to replace it after customer make payment. This is part of form that my bank offer me. Invoice No :<INPUT type="text" id=INVMERCHANT name=INVMERCHANT value="000000009999"></form><button onclick="document.sendform.submit();">Submit</button><!--<script>document.sendform.submit();</script>--></body>
You should probably be storing the invoice number in a database and query it for the max value then add 1 to it: SELECT (MAX(invoiceno) + 1) AS invoiceno FROM invoices Code (markup): You could also just write the number to a file every time your customer makes a payment. Later you'd just read the line from the file using a script.