include('content_header.php')?>
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$contact_no = $_REQUEST['contact_no'];
$address = $_REQUEST['address'];
$company = $_REQUEST['company'];
$subject = $_REQUEST['subject'];
$question = $_REQUEST['question'];
$btn = $_REQUEST['btn'];
//$subject = "FAQ for ".$subject.;
if(!empty($btn))
{
if(strcmp($btn,"Submit")==0)
{
$recipient = "info@halalcertificate.in";
//$recipient = "janani@abcinfomedia.co.in";
$message =
'
CONTACT US
Message from the Contact Us Page
- Name : '.$name.'
- Email : '.$email.'
- Phone Number :'.$contact_no.'
- Company Name :'.$company.'
- Address: '.$address.'
- Question: '.$question.'
|
|
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= "From:"." $name"." <$email>" . "\r\n";
//Captcha verification
require('recaptchaGoogle/src/autoload.php');
$siteKey = '6LehY6sUAAAAANZm1w87tRbG1iX2IGl8Wjg7Tckr';
$secret = '6LehY6sUAAAAAAWDJ-I_ifys5Rz4AKeM6FW6VgaU';
$recaptcha = new \ReCaptcha\ReCaptcha($secret);
$gRecaptchaResponse = $_POST['g-recaptcha-response']; //google captcha post data
$remoteIp = $_SERVER['REMOTE_ADDR']; //to get user's ip
$recaptchaErrors = ''; // blank varible to store error
$resp = $recaptcha->verify($gRecaptchaResponse, $remoteIp); //method to verify captcha
if ($resp->isSuccess()) {
//New SMTP functionality
smtpmailer($recipient,'[email protected]', 'Halal Certiticate', $subject,$message);
echo "";
} else {
$recaptchaErrors = $resp->getErrorCodes(); // set the error in varible
}
//Captcha verification
}
}
?>
include('content_footer.php')?>