Php form

Hi,
My developer got sick and now I’m left with a form I don’t really know how to complete. He did finish one form, which has now grown much longer, and I thought I could try just adding to it, but that doesn’t seem to be the case… If anyone could help I’d really appreciate it, thought I’d try and figure it out myself before I go knocking down his hospital room door…
The form is suppose to return all the fields and in the subject line have "health questionnaire name from form. Now it only returns 3 fields, and in the subject line it says "health questionnaire info from field above email. I can’t see anywhere where it is set to return only 3 fields, but I am pretty clueless, and I don’t know what to do anymore.
I added in dobirth, age and gender.

<?php require("class.validate.php"); class HealthQuestionnaire extends Validate { private $_name; private $_dobirth; private $_age; private $_gender; private $_email; private $_phone; private $_message; public $_error = array('nameA' => '', 'DOBA' => '', 'ageA' => '', 'genderA' => '', 'emailA' => '', 'phoneA' => '', 'messageA' => ''); /*===================== Accessor Methods =====================*/ /*========================================================*/ public function get_Name() { return $this->_name; } public function set_Name() { if(empty($_POST['name'])) { $_POST['name']=""; } $this->_name = $_POST['name']; } /*========================================================*/ public function get_dobirth() { return $this->_dobirth; } public function set_dobirth() { if(empty($_POST['dobirth'])) { $_POST['dobirth']=""; } $this->_name = $_POST['dobirth']; } /*========================================================*/ public function get_age() { return $this->_age; } public function set_age() { if(empty($_POST['age'])) { $_POST['age']=""; } $this->_name = $_POST['age']; } /*========================================================*/ public function get_gender() { return $this->_gender; } public function set_gender() { if(empty($_POST['gender'])) { $_POST['gender']=""; } $this->_name = $_POST['gender']; } /*========================================================*/ public function get_Email() { return $this->_email; } public function set_Email() { if(empty($_POST['email'])) { $_POST['email']=""; } $this->_email = $_POST['email']; } /*========================================================*/ public function get_Phone() { return $this->_phone; } public function set_Phone() { if(empty($_POST['phone'])) { $_POST['phone']=""; } $this->_phone = $_POST['phone']; } /*========================================================*/ public function get_Message() { return wordwrap($this->_message, 135, "
\n"); } public function set_Message() { if(empty($_POST['message'])) { $_POST['message']=""; } $this->_message = $_POST['message']; } /*========================================================*/ /*========================================================*/ /*========================================================*/ public function __construct() { $this->set_Name(); $this->set_Dobirth(); $this->set_Age(); $this->set_Gender(); $this->set_Email(); $this->set_Phone(); $this->set_Message(); } public function HealthMod() { echo ''; echo 'Name :
'; echo 'Date of Birth :
'; echo 'Age :
'; echo 'Gender :
'; echo 'Email :
'; echo 'Phone :
'; echo 'Message :
'; echo ''.$_POST['message'].'
'; echo ''; echo ''; } private function MsgConstruct() { $body = $this->get_Name().'
'. $this->get_Phone().'
'. $this->get_dobirth().'
'. $this->get_Age().'
'. $this->get_Gender().'
'. $this->get_Message(); return $body; } private function EmailContact() { if (isset($_POST['send'])) { if($this->checkEmail($this->get_Email())==FALSE) { $this->_error['emailA']='This email address is invalid'; } else { $headers = 'From: '.$this->get_Email()."\r\n"; $headers .= 'MIME-Version: 1.0'."\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n"; $to='[email protected]'; $subject='Health Questionnaire '.$this->get_Name(); if (mail($to, $subject, $this->msgConstruct(), $headers)) { echo ''; } else { echo ''; } } } } public function __destruct() { } } ?>

///////////////////////////////////////////////

I dunno if its important but this is the validate that was also linked

<?php class Validate { public static $emailPattern = '/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~][email protected]((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i'; public static $numPattern = '/[^0-9]*/'; /*===================== Accessor Methods =====================*/ /*========================================================*/ /*========================================================*/ /*========================================================*/ public function sanitizeNumber($num) { return preg_replace(self::$numPattern,'', $num); } public function sanitizePhone($phone) { $cleanPhone=$this->sanitizeNumber($phone); if(strlen($cleanPhone)>10) { return FALSE; } else { return TRUE; } } public function checkEmail($email) { if (preg_match(self::$emailPattern, $email)) { return TRUE; } else { return FALSE; } } } ?>

Post your form as well

The form is in the php.
I just paste this in the html where I want the form to be

<?php require("scripts/class.healthq.php"); $HealthForm=new healthq(); $HealthForm->HealthMod(); ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service