Forum Moderators: mack
I have read other posts about this topic, but I still do not understand. I am not a good programmer, so it does not make much sense to me. Could anyone explain this to me in a way that I could understand? thanks alot.
The form element takes an action= attribute. That's the place where your HTML gives instruction about exactly what to do when the form is submitted.
A really "down and dirty" action uses the mailto: protocol and sends the information directly via your visitor's email. There are a pile of reasons not to do this, but it is the most basic possibility. A Google search on "form action mailto:" will give you some idea of the issues involved with this apparently simple solution. In a word, I urge you not to do this.
MUCH more common is for the form to use a script on the server that captures the included data, formats it, and then uses the server to send out an email. This server side script can use ASP, PHP, Perl, any kind of CGI script. There are free scripts available all over the web, and many web hosts have something pre-installed for you to use in a relatively painless fashion.
As Tedster suggests, you can simply set the form action <form name="myform" action="mailto:you@somedn.com">.
The more complex method is to use a script language like PHP or ASP to 'handle' the form elements (the contents of the fields) and let it send the email. The specifics of how this is done depend upon the script language but the basics are you'd format a basic message and then invoke the email function - often email() - and then pass it the necessary parameters like TO, FROM, SUBJECT, COPY.
The action method is quick and dirty but does not allow for formatting. The script method allows for much more control.
Do you know why this does not work? Or, do you think that I should just use PHP? If so, is there a way to use php in the same webpage in dreamweave because I have a limit as to how many webpages that I can use (this might sound like a dumb question, but i dont know any programming languages). thanks.
RE: PHP in the same webpage. Yes. Set the form action to call the same page. At the top of the page you should have your PHP script looking for the existence of one of the variables. If the var doesn't exist (first time the page is loaded by the visitor) then PHP script isn't executed. The second time though, the PHP script finds $name (for example) and composes and sends the email.