View Single Post
  #2 (permalink)  
Old 07-08-2009
Codehead's Avatar
Codehead Codehead is offline
Administrator
Company name: Codehead LLP
VA Feedback: (20)
 
Join Date: Apr 2007
Location: WA
Posts: 161
Default Re: Dreamweaver code

You need a from processor, a server side script to send you the info, if your hosting package supports PHP then put this all the way on top of your code:

PHP Code:
<?php
if (!empty($_POST)) {
   
$email 'YOUR EMAIL ADDRESS'/* EDIT THIS */
   
$subject 'From contact form';
   
$body '';
   
$fields = array('Name''Email''Comments');
   
$valid true;
   foreach (
$fields as $field) {
       
$value trim(strip_tags($_POST[$field]));
       if (
$value == '') {
           echo 
$field .' can\'t be empty.<br />';
           
$valid false;
       }
       
$body .= $field .': ' .$value .'<br />';
   }
   if (
$valid) {
      
mail($email$subject$body);
      echo 
'Thanks, we will reply as soon as possible.';
   }
}
?>
I hope this helps
__________________
"Imagination is more important than knowledge."
Albert Einstein
Reply With Quote