I have built my own contact form that sends an e-mail on submission with the information that the visitor has populated the form with. I have not used a plugin to create the form because I needed very specific functionality.
The last thing for me to do now is to create a counter that generates a unique number per form submission. This number is to be included as an order number of sorts in the e-mail that is sent from the form.
I have searched extensively, but my knowledge on this subject is limited. I therefore do not know quite what I am looking for. I think I need to do this in the Wordpress database for the number to be persistent.
How I can do this or where to start is the problem for me. Can someone point me towards a way to do this that is possible for a beginner?
All my code is now in a template file that loads on the Wordpress page that shows the form.