Question
Adding a refernce number to a form
Hi Folks,
I have a form on my website which acts as a questionanire. As the data is purely qualitative I've not set it up to insert the data into a databse, only to forward it via a formail page to my email address. I would however like to add sequential reference number to every form. It's all set up in PHP with a MYSQL databse tie dinto oter parts of the site, so I could use a table to hold teh reference number if necessary, although I don't really need the number for anything more than to distinguish one email from another when they're piled up onmy desk.
My guess is that I need to ctreate a table to hold the number then use that number as a hidden field which will be submitted with the form then somehow (and this is the bit I'm not sure about) add 1 to the refence number in the databse table when the submit button is clicked.
Can anyone suggest a better way or help me with the code to add to the submit button which will increment the database number?
Cheers
Dave
I have a form on my website which acts as a questionanire. As the data is purely qualitative I've not set it up to insert the data into a databse, only to forward it via a formail page to my email address. I would however like to add sequential reference number to every form. It's all set up in PHP with a MYSQL databse tie dinto oter parts of the site, so I could use a table to hold teh reference number if necessary, although I don't really need the number for anything more than to distinguish one email from another when they're piled up onmy desk.
My guess is that I need to ctreate a table to hold the number then use that number as a hidden field which will be submitted with the form then somehow (and this is the bit I'm not sure about) add 1 to the refence number in the databse table when the submit button is clicked.
Can anyone suggest a better way or help me with the code to add to the submit button which will increment the database number?
Cheers
Dave
