Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
I use php to to email form results. Any server side language should do, though. The simplicity and security will really depend more on your form and how you write the code than which language you choose. You could write a simple and secure mail script in any language and you can equally write a complex and insecure mail script in that same language.
However, cgi tends to be more complicated than it needs to be in my opinion and javascript (on the client) is less secure since your code is visible to anyone who wants to see and can also be manipulated by anyone who wants to see. You never want to trust input from JavaScript. You'd still want to validate it on the server side.
Pick a server side language like php or asp and look for a tutorial. A mail script is pretty simple in either and probably one of the first things most people learn when starting to use a server side language.
Here's a page from the php.net site on using the mail() function. If you scroll down the page there are plenty of examples on using it.
The one thing I didn't see on that page is the connection to the form. When you see something like $title=$_POST['title']; the $_POST['title'] is passed from the form and it would be the field with an id="title"
Hopefully that makes sense. If not feel free to ask questions. There are a lot of tutorials online too that will walk you through the whole form and script.
Last edited by vangogh; 10-23-2008 at 07:59 PM..
|