Incorrect validation code.
Please use the back button on your browser and correct the error.
"; } $email=$_REQUEST['Email']; if (!$email) { $perror=1; echo "




Invalid email address.
Please use the back button on your browser and correct the error.
"; } if (!preg_match("/^([a-zA-Z0-9])(.)+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $email)) { $perror=1; echo "




Invalid email address.
Please use the back button on your browser and correct the error.
"; } if (!$perror==1) { $filename = $_POST['filename']; //this is the filename input of your form $limit_size=2000000; //if ($_FILES['filename']['size']>1000000) //echo "To Large"; //} $file = basename($_FILES['filename']['name']); if($file>'') { $file_size=$HTTP_POST_FILES['filename']['size']; if($file_size >= $limit_size){ echo "
You file is over the 2MB limit!"; $perror=1; } $uploaddir = 'uploads/'; //where you want the file to go $file = stripslashes($file); // Check file extension $allowed_filetypes = array('.jpg','.jpeg','.gif','.png'); $ext = substr($file, strpos($file,'.'), strlen($file)-1); if(in_array($ext,$allowed_filetypes)){ } else { echo "




You may only send the following file extensions - jpg, jpeg, gif, png.
Please use the back button on your browser and correct the error.
"; $perror=1; } ////////////////// if (!$perror==1) { $uploadfile = $uploaddir . $file; //the move_uploaded_file() function is what moves the temp working file to it's final location. if (move_uploaded_file($_FILES['filename']['tmp_name'], $uploadfile)) { // echo "
"; 
// echo "Successfully Uploaded: $file...\n"; 
		//$mail->AddAttachment('uploads/' . $file);
		$myfile=1;
}
		} else { 
//$perror="Your email was sent but the file attachment failed.";
//header("location:" . $retpage . "?perror=" . $perror);
 echo "




upload failed!\n"; $perror=1; } } } if (!$perror==1) { require_once('class.phpmailer.php'); $subject=$_REQUEST['subject']; $mto="admin@javeavillaevents.com"; $mfrom=$email; $mail = new PHPMailer(true); $mail->IsHTML(true); $mail->IsSMTP(); $mail->SMTPAuth = false; // enable SMTP authentication $mail->Host = "mail2.palmsecure.biz"; // sets the SMTP server $mail->Port = 25; // set the SMTP port for the GMAIL server $mail->AddAddress($mto); $mail->WordWrap = 150; $mail->SetFrom($mfrom); $mail->Subject = $subject; $body = "
Name".$_REQUEST['Name']."
Telephone".$_REQUEST['Telephone']."
Email".$_REQUEST['Email']."
Location".$_REQUEST['Their_Location']."
Services".$_REQUEST['Services_Offered']."
Languages".$_REQUEST['Languages']."
Hobbies".$_REQUEST['Hobbies_Interests']."
Sexuality".$_REQUEST['Sexuality']."
Description".$_REQUEST['Description']."
Experience".$_REQUEST['Experience']."
Contact".$_REQUEST['Contact']."
To view the message, please use an HTML compatible email viewer!
"; if ($myfile==1) { $mail->AddAttachment('uploads/' . $file); } $mail->MsgHTML($body) ; $mail->Send(); if ($myfile==1) { unlink('uploads/' . $file); } header("location:".$_REQUEST['redirect']); }