PDA

View Full Version : directing enquiry form on my site to where?


gloryboy
10-15-2006, 02:09 AM
hi guys and girls

i new to all this and have choosen hostmonster to host multiple sites, i am on my first site and have made an enquiry form with a submit button, but i dont what to do after that, when or how do i set it up so when someone sends and enquiry i can read the email,

cheers

Aaron
10-15-2006, 05:00 AM
In order for the contents on the enquiry form to be send to you after a user has clicked the submit button, you need to tell the form the appropriate action to take. The easiest one is to use the mailto tag, but I don't recommend it because it requires a working email client to do that.

The other alternative is to use a script, either cgi or php. I have used before formmail, which I think is quite an easy script to use.

First, download the formmail script from here (http://www.boaddrink.com/projects/phpformmail/download.php)

Unzip the file and open up formmail.php using any text editor. Look for line 40-41 and replace the email@yourdomain.com with the email that you want enquiries to be sent to. The line looks like this:

// To change the address the e-mail comes from use define('FROM', 'Example Name <email@example.com>');
define('FROM', 'email@yourdomain.com', null);

Save the file and upload the file to the same directory where the webpage containing the enquiry form is.

In the webpage that contains your enquiry form, you need to add a couple of lines of of code to the page. Place the following code before code of your enquiry form:

<form action="formmail.php" method="post">

<input type="hidden" name="recipient" value="email@yourdomain.com">

Your webform should be able to send the email containing the contents of the enquiry form to email@yourdomain.com

Fred Garvin
12-19-2006, 10:30 PM
Hi. I tried this and got the following. Is there any way to send email without using monstermail? I could not get cgiemail to work either although it was put in my cgi-bin directory. I'm having a difficult time getting answers. Anyone have the explanation?
The following errors were found:
You are coming from an unauthorized domain. Please read the manual section titled "Setting Up the PHPFormMail Script".
You are trying to send mail to a domain that is not in the allowed recipients list. Please read the manual section titled "Setting Up the PHPFormMail Script".
PHPFormMail has experienced errors that must be fixed by the webmaster. Mail will NOT be sent until these issues are resolved. Once these issues are resolved, you will have to resubmit your form to PHPFormMail for the mail to be sent.

sjlplat
12-20-2006, 08:20 AM
I use the Feedback Form Wizard at http://www.thesitewizard.com/wizards/feedbackform.shtml

It's easy to setup, customizable, and it works.