Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Better form processing, saving, etc.

4:11 pm on Aug 10, 2012 (gmt 0)

New User

10+ Year Member

joined:Sept 14, 2003
posts: 5
votes: 0

I've been using NMS formail for years and I like it but the resultant output from the form comes in an email in very unnattractive hard to read format. I need to be able to "format" the results of the form to my liking, i.e.

Also, I don't want SSNs and other private data sent to me via this form. What would be a good solution to having one that saves the data on the server so I can download it vs. send it to me in an email. that way I can ask for private info without fear. I have an SSL so I can pipe it thru that when needed.

So let me summarize:
need a form processing system that I can:
1. duplicate easily for any website
2. saves data on server (configurable location) and sends me an email alerting me that there is a new submission
3. allows me to add fields and have the resultant output configurable so that when I download it, it is neat and readable

is thsi possible with perl or would I be better served using php? Any ideas would be great, thanks so much!
2:32 pm on Sept 23, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2003
posts: 1208
votes: 0

hotwired, I've done this exact thing.

It doesn't matter whether you do it with Perl or PHP, either can handle this job just as well.

I'm not up on what off-the-shelf scripts are out there, since I write my own. And this is a big enough script that I wouldn't just whip up the code for you here, so I suggest starting to write it, and then post back here if you have problems.


(1) You've got to make sure that spammers don't hijack your script to send out spam to others. If your script doesn't mail to your site visitors, then it's easy to avoid exploits. But if you're collecting an email address and mailing to that address, then make sure to reject email address input that has multiple addresses entered (e.g., filter out things like "," "\n" "bcc:" "cc:").

(2) If the script is hard-coded to always mail you, then you'll know every time it's used.

(3) Save the data into a MySQL database, or in text files that are either above the webspace or in password-protected directories.

Hope that's enough to get you started.