";
}
if(!preg_match($regeml, $_POST['email'])){
$form_valid = false;
$errors .= "• Please enter a valid email address. ";
}
if($_POST['message'] == ""){
$form_valid = false;
$errors .= "• Please enter your message ";
}
//if all checks out...
if($form_valid == true){
//...we construct and send an email...
$strMessage = $_POST['name'] . " submitted information to the contact form:\r\n";
$strMessage .= "Name: " . $_POST['name'] . "\r\n";
$strMessage .= "Email: " . $_POST['email'] . "\r\n";
$strMessage .= "Message: " . $_POST['message'];
mail('info@humanrights.org.au','YHRA Contact Form',$strMessage,'From: ' . $_POST['email']);
//...then, we display the thank you message.
?>Thank you Your message has been sent, and we will respond to it shortly.
For further information about Youth for Human Rights Australia: