Contact Par 4 DJ Services
Thank you for your interest in Par 4 DJ Services. Please fill out
the form below and we will respond to you
within 24 hours.
(All fields with * are required to submit)
if (isset($_POST['submit'])) {
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$reason=$_POST['subject'];
$comments=$_POST['comments'];
$warn=0;
if ($mydate==$todaysdate)
{
$mydate="$year-$month-$day";
}
include("securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['code']);
if($valid == false) {
$warn=1;
$warn_msg="Sorry, the code you entered was invalid. Go back to try again.";
}
if ($name==""){
$warn=1;
$warn_msg="You need to include your name to submit the form.";
}
if (!preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-])*\.([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email)) {
$warn=1;
$warn_msg="You need to include a valid email address to submit the form.";
}
if ($warn==0){
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if ($comments==""){
$email_comments="$name did not leave any message for you. Please refer to general information about $name";
}
else
{
$email_comments=$comments;
}
$to = "info@par4dj.com";
$subject = "$name has a $reason inquiry";
$body = "----------- $name's message is below -----------" ."\r\n\r\n".
"$email_comments" ."\r\n\r\n".
"----------- General Information -----------" ."\r\n\r\n".
"name: $name" ."\r\n".
"Email: $email" ."\r\n".
"Phone: $phone" ."\r\n".
"Subject: $reason" ."\r\n".
"Date Of Event: $mydate";
$hrd = "From: $name <$email>";
if (mail($to, $subject, $body, $hrd)) {
ini_restore(sendmail_from);
echo("
Your $reason inquiry was sent successfully!
Thank you for contact us at
Par 4 DJ Services. Your $reason inquiry is
very important to us. We will respond to your email in the next 24 hours.");
}
}
}
echo $warn_msg;
?>
|