Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI MailForm Scripts

Help! Please!

         

WebMan61

2:53 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



I am trying to set up Form Mail to put in the CGI bin on the web site i am working on. I was told by my hosting company to use a script from Matt's Script Archive scriptarchive.com. I have used the varibles they sugested that i use but it doesnt do what i want it to do. I want this form when it filled out successfully to link to a page i created that says you filled out the form successfully and thank you. The form will also send the form results to multiple email addresses.
I always get good advise from here. Thanks to eveybody that helps out.

[edited by: jatar_k at 3:25 pm (utc) on April 8, 2003]
[edit reason] delinked [/edit]

maccas

3:04 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



Hi WebMan61, I havn't used this script for quite a while but I believe there is a variable about half way down the script where you can put in a URL and it will forward the user to this page after they fill in the form, so you can redirect them to a thank you page, is this what you are trying to do? and it isn't working?

WebMan61

3:28 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



Thanks maccas
On the script i am using there are 3 varibles to set.
1. mailprog ='/usr/sbin/sendmail';
2. @referers = (domain name','host ip address');
3. @recipients =?
Do i put the email address(es) here to send results or what? I still dont see a varible to link to a conformation page for the user.
Thanks

Timotheos

3:41 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is the way I have my form mail set up.

<FORM METHOD=POST ACTION="http://www.yourdomain.com/cgi-bin/formmail.cgi">
<input type=hidden name="recipient" value="email1@yourdomain.com, email2@yourdomain.com">
<input type=hidden name="subject" value="Widgets">
<input type=hidden name="required" value="email">
<input type=hidden name="redirect" value="http://www.yourdomain.com/confirmation.html">

Birdman

3:46 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I doubt this will answer your question but I think it's worth noting anyway.

Be sure to rename formmail.cgi to something else to prevent hackers from finding it and remember to change the name in the <form> tag also.

It is a good idea to quote all attributes like "hidden".

Other than that, I don't see anything wrong. You do have the closing </form> tag, right?

Allen

3:47 pm on Apr 8, 2003 (gmt 0)

10+ Year Member



I highly recommend you switch to the formmail at [nms-cgi.sourceforge.net...] Matt's formmail is out of date (even by his own admission) and NMS is his recommended replacement. At the company I work at we've been using it since Matt recommended it and we've had no problems at all.

I also thin kit's easier to set up than the MSA script, but that's just my opinion.

Allen

Timotheos

5:26 pm on Apr 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Birdman, Yep I left of the closing </form> along with some other stuff that should be obvious. You're absolutely right about the security issues. I found this out the hard way.

Allen thanks for the link. I didn't know about nms-cgi. Matt's script was offered by my hosting service so I just used it. That's probably pretty common, eh? Nice to know there is something better out there.