include("ads/sky160.php");
?>
|
";$error=1;}
if (strlen($review) > 10000){$msg .= "- Your review is too LONG. ";$error=1;}
if (!preg_match("/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.([a-zA-Z]{2,6})$/", $email))
{
$msg .= "- Invalid e-mail address ";
$error=1;
}
if (!$name) {$msg .= "- You didn't provide a name! ";$error=1;}
if (!$age) {$msg .= "- You didn't provide your age. ";$error=1;}
if (!$live) {$msg .= "- Please tell us where you live. ";$error=1;}
if (!$theatre) {$msg .= "- Fill in the theatre field. ";$error=1;}
}
else show_form();
if ($_POST['revsubmit'] && $error==1) {
echo "There was a problem in your submission. Please check the following: $msg";
show_form($name,$email,$review,$spoilers,$age,$live,$theatre);
}
if ($_POST['revsubmit'] && $error==0)
{
$mail_path = "/usr/sbin/sendmail";
$mail_to = "ganeshcp@gmail.com";
$from_email = "noreply@vluvshahrukh.com";
ini_set("sendmail_path", $mail_path);
$mail_subject = $_POST['userSubject'];
$submittime = $_SESSION['submittime'];
if (!$_POST['spoilers']) $spoilers = "No";
mail($mail_to,"MNIK Review", "Name:\n".$_POST['name']."\n\n"."Email:\n".$_POST['email']."\n\n"."Spoilers:\n".$spoilers."\n\n"."Age:\n".$_POST['age']."\n\n"."Living:\n".$_POST['live']."\n\n"."Theatre:\n".$_POST['theatre']."\n\n"."Review:\n".$_POST['review']."\n\n"."User Agent:\n".$_SERVER["HTTP_USER_AGENT"]."\n\n"."User IP:\n".$_SERVER["REMOTE_ADDR"],"From:".$_POST['name']." <".$from_email.">");
echo "Thank you for your review.";
}
function show_form($name="",$email="",$review="",$spoilers="",$age="",$live="",$theatre="") {
?>
|