Employees Corner
×
send message
Inquiry Form
×
send message
Home
About Us
Inquiry
Contact Us
Inquiry Indigo
A Complete Manpower Solution
Home
Inquiry
INDIGO
Contact INDIGO
Let’s talk about your project.
$show_form=true; class MyValidator extends CustomValidator { function DoValidate(&$formars,&$error_hash) { if(stristr($formars['address'],'http://')) { $error_hash['address']="No URLs allowed in address"; return false; } if(stristr($formars['address'],'@')) { $error_hash['address']="No Email Address allowed in address"; return false; } if(stristr($formars['query'],'http://')) { $error_hash['query']="No URLs allowed in query"; return false; } if(stristr($formars['query'],'@')) { $error_hash['query']="No Email Address allowed in query"; return false; } return true; } } if($_GET['Submit'] == 'Submit') { // if($_POST['img_code']==$_SESSION['security_code']) // { $_SESSION['name'] =$_POST['name']; $_SESSION['phone'] =$_POST['phone']; $_SESSION['email'] =$_POST['email']; $_SESSION['query'] =$_POST['query']; // VERIRY INPUT DATE $validator = new FormValidator(); $validator->addValidation("name","req","Please fill in Name"); $validator->addValidation("phone","req","Please fill in Phone"); $validator->addValidation("email","req","Please fill in Email and a valid email address"); $validator->addValidation("email","email","The input for Email should be a valid email address"); $validator->addValidation("img_code","code","Security code is not matching ! Try again."); $custom_validator = new MyValidator(); $validator->AddCustomValidator($custom_validator); if($validator->ValidateForm()) { // Send email to client $message = ' Name= '.$_POST['name'].' Tel= '.$_POST['phone'].' E-mail= '.$_POST['email'].' Query= '.$_POST['query'].' '; //print $message;die; // $to = ' waghela88@gmail '.', '; $to = 'info@indigosolution.in'; $subject = 'Inquiry from indigosolution.in '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; //***********************************************************************************************// $headers .= 'From: '.$_POST['name']. " " .$_POST['email'].'' . "\r\n"; //Put Email contactform@yourdomain.com here and Put name here //***********************************************************************************************/ $headers .= 'Reply-To: '.$_POST['email'].'' . "\r\n" ; mail($to, $subject, $message, $headers); // Remove all data from session unset($_SESSION['name']); unset($_SESSION['phone']); unset($_SESSION['email']); unset($_SESSION['query']); $show_form= false; // redirect page ?>
Thank you
Your detail has been submitted successfully.
We will get back to you shortly
You can feel free to contact us
} else { $error_hash = $validator->GetErrors(); $error.=""; foreach($error_hash as $inpname => $inp_err) { if($inpname=="name") { $nameerror = $inp_err; } if($inpname=="phone") { $phoneerror = $inp_err; } if($inpname=="email") { $emailerror = $inp_err; } if($inpname=="query") { $queryerror = $inp_err; } if($inpname=="img_code") { $codeerror = $inp_err; } } ?>
See error below
} /*/ } else { ?>
See error below
$codeerror = "Security code is not matching ! Try Again"; } /*/ } else { } if(true == $show_form) { ?>
print $nameerror; ?>
print $emailerror; ?>
print $phoneerror; ?>
print $queryerror; ?>
print $codeerror ?>
send message
} ?>
Employees Corner
Inquiry Form