Creating a contact for for dreamveaver you need to create two files. On your actual .html files the other is the actual .php. I have called mine form.html, thankyou.html, and form.php. You should put all files in the same directory. Here is the code for the php file and html.
/* Form.php */
<?php
$EmailFrom = "info@caltechsys.com"; /* Email name sent from */
$EmailTo = "info@caltechsys.com"; /* Your email address sent to */
$Subject = "Website"; <Subject in the email sen t> /* These are the information taken */
$First = Trim(stripslashes($_POST['First'])); /* from form. */
$Last = Trim(stripslashes($_POST['Last']));
$Company = Trim(stripslashes($_POST['Company']));
$Email = Trim(stripslashes($_POST['Email']));
$Telephone = Trim(stripslashes($_POST['Telephone']));
$Mobile = Trim(stripslashes($_POST['Mobile']));
$Comments = Trim(stripslashes($_POST['Comments']));
// validation
$validationOK=true;
if (Trim($First)=="") $validationOK=false; /* Validation for three fields */
if (Trim($Last)=="") $validationOK=false;
if (Trim($Email)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; /* Calls error.htm form if error */
exit;
}