View Full Version : Form Mail script with auto sequential numbering
12-04-2003, 06:59 PM
hello... I'm looking for an email form script that will add an identification number to each msg sent automatically and increase the number sequentially when the next msg is sent. Any suggestions?
12-04-2003, 07:17 PM
Could you provide some more information?
Will you be using any server side languages (asp, php, coldfusion)? a database (mysql, oracle, ingris)?
Describe thoroughly the process that you are wanting. Thanks.
12-05-2003, 12:53 AM
Sorry for being vague. A restaurant client wants a form on their site for people to request gift certificates online. The form would sendmail the request to the restaurant admin and the requester. The form will have some standard info fields (name, phone, $$ amount, etc.) They want a unique identifier automatically generated on each request that would be incuded on the email msssages.
The first request would be transaction #0001. The next person to make a request would be transaction #0002. And so on...
The form program will be serverside, either PHP or pearl. I can set up any of several form processing programs for sending the emails, but have not found one that will add a transaction number that will generate and sequence automatically.
Hope this helps explain. Any help would be greatly appreciated!
12-05-2003, 03:56 PM
Simplest way would be to open a text file, read the number from the file, increment the number and then rewrite the file with the new number. You should have no problem doing it with Perl.
Then you could include it in the message body or whatever by a server side include.
12-08-2003, 07:46 AM
Alternatively, you could log each transaction in a database (instantly creating a record of buyers and their email addresses!!) and pull up the next number from the database prior to writing the form.
12-08-2003, 07:20 PM
that's why I originally asked him first about server side scripting languages and then databases... from his answer it doesn't look like a database has been considered, so an alternative needed to be given.
12-15-2003, 08:25 PM
If your site lending on the server with Perl and PHP it easy to make script.
What does your server have?