Jump to content
xisto Community
Sign in to follow this  
nelito0982

Dreamweaver Forms HELP

Recommended Posts

For something like that, you need to use php. There are a lot of tutorials on how to do different things with php, and I'm pretty sure there's one on how to do mail with it. There should be something on Google if you can't find it here.
If you're trying to test the file on your home computer, you need to have php installed(most likely with Apache).
EasyPHP is the easiest way to install everything you need for php and mySql(that I know of).

I've never successfully been able to get a mail form to work on my home computer, but everything works on hosted sites here, because they already have everything installed.
According to http://www.freewebmasterhelp.com/tutorials/php/5 you need this:

<?php$to = "php@gowansnet.com";$subject = "PHP Is Great";$body = "PHP is one of the best scripting languages around";$headers = "From: webmaster@gowansnet.com\n";mail($to,$subject,$body,$headers);echo "Mail sent to $to";?>

To set one of those variables to equal an input, just make sure everything is all in one form, make some text inputs, set their id to something useful (such as 'body') and set the form's action to be the url of your php file.(HTML and php can be in the same file. Just make sure the php is enclosed in <?php and ?> tags)
Then, instead of having it be "$body = '...'", you set it to "$body = $_POST['body']"(without the double quotes) Then you can do that for whichever other variables you need.
I'm not sure if you're ever supposed to set the 'from' variable for the mail function.

I hope this was helpful, and if anything I've said doesn't work, either ask the other people on the forums, or Google it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.