<?php

$EmailFrom = "webmaster@ez-promote.com";
$EmailTo = "webmaster@ez-promote.com";
$Subject = "Banner Ad / Buy Credits!";
$Name = Trim(stripslashes($_POST['Name'])); 
$Image = Trim(stripslashes($_POST['Image']));
$Email = Trim(stripslashes($_POST['Email'])); 
$Message = Trim(stripslashes($_POST['Message']));

// validation
$validationOK=true;
if (!$validationOK) {
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  exit;
}

// prepare email body text
$Body = "";
$Body .= "Title: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Image URL: ";
$Body .= $Image;
$Body .= "\n";
$Body .= "Target URL: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "None: ";
$Body .= $Message;
$Body .= "\n";

// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page 
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=http://192.168.1.108/post-free-link/free-1-day.php/contactthanks.php\">";
}
else{
  print "<meta http-equiv=\"refresh\" content=\"0;URL=http://192.168.1.108/post-free-link/free-1-day.php/contactthanks.php\">";
}
?>
