PDA

View Full Version : Help with emailing form results


adsummy
03-15-2007, 05:16 PM
I am totally new to cgi/perl. I have a simple form on one of my websites (alleghenymeadows.com/contact_us.html) and I am struggling to make it work. I downloading and configured a ready made cgi script that should handle it but it still does not work. Any tips or suggestions would be greatly appreciated.

mlseim
03-15-2007, 05:47 PM
First of all, welcome to the forum.

You are discussing probably the most discussed topic on this forum.

You could probably find hundreds of related threads if you do a search.

It's not that we don't want to help, but it's really hard to keep going
over the same topic all the time.

Looking at your page, I see these possibilities:

1) This line:
<form name="contact" action="cgi-bin/FormMail.cgi" method="post">

the path is probably wrong. Try either of these:
<form name="contact" action="http://www.alleghenymeadows.com/cgi-bin/FormMail.cgi" method="post">
<form name="contact" action="./cgi-bin/FormMail.cgi" method="post">

EDIT: Looking closer, it appears as though your script is not uploaded into your cgi-bin directory.
Either it's not uploaded, or it's not "FormMail.cgi" ... check filename.

2)
When you uploaded the script in ASCII mode (not binary), you then need
to set the script permissions to 0755 (CHMOD 755) using your FTP program,
or your webhost control panel ... however you access your cgi-bin.

3)
Other than that, we can't see how your script is configured, so you'll need
to look at that yourself.

adsummy
03-15-2007, 06:17 PM
Thanks for your quick response. I messed with it some more. My script was not uploaded in the right directory. Hopefully it's okay now.

FishMonger
03-15-2007, 07:16 PM
the path is probably wrong. Try ....:
<form name="contact" action="http://www.alleghenymeadows.com/cgi-bin/FormMail.cgi" method="post">
The only time you should ever use a FQDN url is when the script is on a different web server than the form. Instead you should use the absolue or relative path. When you use a url, the web server needs to do a DNS querry each time it calls the script, which reduces performance.

adsummy
03-15-2007, 07:51 PM
It's working now. I appreciate the help.