hello,
i am creating a web form and i would like to use some kind of counter to create a 'form number' or something similar.
what i did so far was using php to read a txt file on the server, insert that value into a hidden field. (i made the form so that when it is submitted, all the results are sent via an HTML based email...no mysql was used). and then that value is increased by 1, and saved again.
the above works fine, but my problem is that if a form is NOT submitted, the value would increment, and i dont want that. so, i am asking for some advice on how to make it so that it will increment only when the form is successfully submitted.
and i should also mention that i used some javascript for basic form validation....is that a problem? i am still a novice in php.
any tips/suggestions would be most appreciated.
thanks