gschimek
11-16-2004, 11:11 AM
I've got a website with an evaluation form on it with multiple fields to fill out. I've written a perl script that takes the data from each field and then writes it to a different file for each field, so that each data file only contains information from one certain field.
That part all works fine. But what I'd like to do is be able to email all that data to me each time someone fills out the evaluation form. I've been able to write a script that takes an email address, subject, and body of a message and send it using sendmail, but I don't know how to do it with multiple fields. And since I want the script to do more than just email (i.e. creating the separate files from above) I can't just used a canned form2mail script, or at least I can't use one of them by itself.
So how can I take information entered into multiple fields and email them with sendmail? Do I need to put the field data into a hash somehow? Or is there a better idea.
That part all works fine. But what I'd like to do is be able to email all that data to me each time someone fills out the evaluation form. I've been able to write a script that takes an email address, subject, and body of a message and send it using sendmail, but I don't know how to do it with multiple fields. And since I want the script to do more than just email (i.e. creating the separate files from above) I can't just used a canned form2mail script, or at least I can't use one of them by itself.
So how can I take information entered into multiple fields and email them with sendmail? Do I need to put the field data into a hash somehow? Or is there a better idea.