Link to home
Start Free TrialLog in
Avatar of zyanj
zyanj

asked on

Dreamweaver Email Submit Button

I created a website using a template. I am editing it using dreamweaver CS3.

On the Contact Us page there is a section where the user can input their email address and message. There is a submit button next to the message box. How do I setup this submit button to send to my email address.

Thanks,
Avatar of ilovemykeyki
ilovemykeyki
Flag of Philippines image

Assuming your using windows to setup and send an email, please read the following link in a step-by-step process.

Cheers!

http://www.webthang.co.uk/Tuts/tuts_dmx/dmxf_5/dmx5_5.asp
You have to have a script to process the form variables.  If your host supports PHP you can follow the example below.  Just create a new php page called something like mail.php.  Make your form action="mail.php" and put the following code in the mail.php page.  You will modify the variables with the NAME of your <input> boxes.
<?php
 
 
 
$recipient = "YourEmail@Address.com";
$subject = "Mailing List Request";
 
$FirstName = $_POST['FirstName']; // where FirstName is the NAME of your <input> field.
$LastName = $_POST['LastName'];
$emailAddress = $_POST['emailAddress'];
 
 
$msg = "FirstName: $FirstName\n";
$msg .= "LastName: $LastName\n";
$msg .= "emailAddress: $emailAddress;
 
 
 
mail("$recipient", "$subject", "$msg", "From: YourEmail@Address.com");
 
?>

Open in new window

Just to take things back a level and to clarify rbudj's post, you need a server-side scripting language to process and send form data.  The template will be designed to look okay on screen but will not have the processing functionality built-in.  Both experts above have provided examples for different server-side languages, and your choice is one of many - ASP, PHP, ASP.NET etc etc.
Either way, you'll have to check with your server hosting company to see which (if any) scripting language is set up to run.

You can see how the template designer did a bit of visual trickery there with their design... ;-)
ASKER CERTIFIED SOLUTION
Avatar of zyanj
zyanj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial