if(isset($_POST['submit'])) { $Flag="true"; if($_SESSION["code"]!=$_POST["captcha"]) { //die("Wrong Code Entered"); $CaptchaErr = "Wrong Code Entered"; $Flag="false"; } if (empty($_POST['txtName'])) { $txtNameErr = "Required !"; $Flag="false"; } else { $txtName =str_replace("'"," ",$_POST['txtName']); } if (empty($_POST['txtemail'])) { $txtemailErr = "Required !"; $Flag="false"; } else { if (preg_match('/^\S+@[\w\d.-]{2,}\.[\w]{2,6}$/iU', $_POST['txtemail'])) { $txtemail = $_POST['txtemail']; } else{ $txtemailErr="Invalid Email address!"; } } if (!empty($_POST['txtMobile'])) { $txtMobile =str_replace("'"," ",$_POST['txtMobile']); /*if (preg_match('/^-?\d\d*$/', $_POST['txtMobile'])) { } else { $txtMobileErr="Invalid Mobile No.!"; $txtMobile=$txtMobile; }*/ } else { $txtMobile =""; } /*if (empty($_POST['txtSubject'])) { $txtSubjectErr = "Required !"; $Flag="false"; } else { $txtSubject =str_replace("'"," ",$_POST['hdn_Subject']); }*/ /*if (empty($_POST['ddlDepartment'])) { $ddlDepartment = "Required !"; $Flag="false"; } else { $ddlDepartment = $_POST['ddlDepartment']; } */ if (empty($_POST['txtMobile'])) { $txtMobileErr = "Required !"; $Flag="false"; } else { $txtMobile =str_replace("'"," ",$_POST['txtMobile']); } $txtMemberNo =str_replace("'"," ",$_POST['txtMemberNo']); if (empty($_POST['txtSuggestion'])) { $txtSuggestionErr = "Required !"; $Flag="false"; } else { $txtSuggestion =str_replace("'"," ",$_POST['txtSuggestion']); } $DeptEmail = "advstudies@icmai.in"; $txtSubject ="Advanced Studies"; $ddlDepartment="30"; //echo "gaurav ". $txtSubject; } ?>