I currently have an html/php form that assigns a stock/invoice number at the beginning upon opening the form page. I need to have it assign this stock/invoice number on submit. The format it uses to assign this number is year, month day specific
## Deliverables
Currently if more than 1 logged in user opens the form page, it assigns the next available stock/invoice number from mysql database to them all. Whoever submits the form first is awarded the current number. If another logged in user submits at the same time he is told that the stock/inoivce is already in use and must fill out the entire form again and submit. This is causing great problems and frustration on their behalf. The form that is submitted contains text and picture files, and must be checked for required fields before submitting.