Thanks Jorn - there is a test page at www.pinerock.com/contactNEW.php.
the php at the head of the page is

if ($_REQUEST['name']!="") {
        $sendTo = 'phi...@thisworldover.com';
        $subject = "Contact Form Submission";
        $headers  = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/
plain; charset=iso-8859-1"."\n";
        $headers .= "From: ".$_REQUEST["name"]." <".$_REQUEST
["email"].">"."\n";
        $headers .= "Reply-to: " . $_REQUEST["name"]. '<' . $_REQUEST
["email"] . '>' . "\n";

        //db post
        $tablename = "pr_contact"; $postkeys = 'id,cdate,remote_ip';
        $postvars = "NULL,'".date("Ymd")."','".$_SERVER["REMOTE_ADDR"]."'";
        foreach ($_POST as $k => $v) { $postkeys .= ",".$k; $postvars .= ",'".
$_REQUEST[$k]."'"; }
        $q = "INSERT INTO ".$tablename."(".$postkeys.") VALUES(".
$postvars.")";  mysql_query($q); //echo "<!-- ".$q." -->";

        // email
        $body = "";
        foreach ($_REQUEST as $key => $value) { $body .= "\n".ucwords
($key).": ".$_REQUEST[$key];    }
        $body .= "\n\nDate : ".date("Ymd")."\nIP : ".$_SERVER
["REMOTE_ADDR"]."";
        mail($sendTo, $subject, $body, $headers);
        //echo "result=ok";
}

there is also a php states array for the form drop down.

the other thing it isn't doing is submitting to the DB, which it was,
but this is less of an issue. generating the email is vital, as you
might guess!! :-) please let me know if you need any further info and
thanks for your help

Reply via email to