0 && $maxlength >= $minlength ) { if( strlen($str) > $maxlength) { return false; } } return true; } if(count($_POST) >=3 ) { $readyForMail = true; if(!chk_value($HTTP_POST_VARS['fname'],'',2 ) ) { $errfname = "(You did not enter your First Name !)"; $readyForMail = false; } if(!chk_value($HTTP_POST_VARS['lname'],'',2 ) ) { $errlname = "(You did not enter your Last Name !)"; $readyForMail = false; } if(!chk_value($HTTP_POST_VARS['phone'])) { $errPhone = "(You did not enter your Telephone Number !)"; $readyForMail = false; } if(!chk_value($HTTP_POST_VARS['email'], $reg_email)) { $errEmail = "(The email is not in proper format !)"; $readyForMail = false; } /* // This is not compulsory field if(!chk_value($HTTP_POST_VARS['address'])) { $erraddress = "(You did not enter address !)"; $readyForMail = false; } */ /* // This is not compulsory field if(!chk_value($HTTP_POST_VARS['query'])) { $errquery = "(You did not enter Query !)"; $readyForMail = false; } */ if($_SESSION[img_string] != md5(strtolower($_POST['image_code'])) ) { $errCode = "(Incorrect Code !)"; $readyForMail = false; } ################################### mail sending parameters ################################################## // now if parameters are validated then send mail if($readyForMail == true) { $msg = " First Name : " . $HTTP_POST_VARS['fname'] . " Last Name : " . $HTTP_POST_VARS['lname'] . " Address : " . $HTTP_POST_VARS['address'] ." Telephone : " . $HTTP_POST_VARS['phone'] ." E-mail Address : " . $HTTP_POST_VARS['email'] ." Query : " . $HTTP_POST_VARS['query']; $subject = 'Feedback from The X Gentlemens Club'; $to = 'jmcguir4@gmail.com'; //$to = 'sandeep@webplanet.co.in'; //additional headers here //$headers = "MIME-Version: 1.0\r\n"; // $headers .= "Content-type: TEXT/PLAIN; charset=iso-8859-1\r\n"; $headers = "From: ".$HTTP_POST_VARS['email']."\r\n"; if(@mail($to, $subject, $msg, $headers)){ header("location: thanks.php"); echo ''; exit; } else { $errmsg = "
Mail could not be sent due to Technical problem. Sorry for Inconvenience!
Please try again Later.

"; } } else { $errmsg = '
Kindly resolve the below error(s) in Red!

'; } ##################################end of mail sending } ?> The X Gentleman Club
 


First Name :
 
Last Name :
 
Phone Number :
 
Email :
 
Address :
 
Query :
 
  Enter the code as it is shown