I'm using Ajax contact form where my contactform.php is something like this :
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = "Contact Form";
$message .= $_POST['name'] . "
";
$message .= $_POST['email'] . "
";
$message .= $_POST['message'];
mail("your@domain.com", $subject, $message, "From: ".$email);
?>
This form script works perfect But My problem is that, My value for "your@domain.com" is dynamic.. So I modified contactform.php to this :
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$emailto = $qc2_options['qc2_form_heading'];
$subject = "Contact Form";
$message .= $_POST['name'] . "
";
$message .= $_POST['email'] . "
";
$message .= $_POST['message'];
mail($emailto, $subject, $message, "From: ".$email);
?>
But this modified script isn't working.. I do get correct value for $qc2_options['qc2_form_heading'];
on echo
But this form dosn't work.
Where I'm going wrong ?