|
Academy for Migration Studies in Denmark (AMID)
Aalborg University
Fibigerstraede 2
DK-9220 Aalborg East
Denmark
amid@amid.dk
Tel: + 45 9635 8080
Fax: + 45 9635 0044
# Code modifications by Nils starts here
if ($_POST['fromform'] == 1) {
$contact_name = $_POST['contact_name'];
$contact_email = $_POST['contact_email'];
$contact_phone = $_POST['contact_phone'];
$comments = $_POST['comments'];
$IP_ADDR = $_SERVER['REMOTE_ADDR'];
$IP_HOST = $_SERVER['REMOTE_HOST'];
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$contact_email)) $ok_email = 1;
if (!empty($contact_name)) $ok_name = 1;
if (!empty($comments)) $ok_comment = 1;
if (($ok_email == 1) && ($ok_name == 1) && ($ok_comment == 1)) {
# Creates the email
$message ="$message Email = $contact_email \n\n";
$message ="$message Name = $contact_name \n\n";
$message ="$message Phone = $contact_phone \n\n";
$message ="$message ----------------------- \n Comments \n ----------------------- \n\n";
$message ="$message $comments \n\n";
$message ="$message ----------------------- \n Sent from \n ----------------------- \n\n";
$message ="$message Remote IP: $IP_ADDR \n\n";
$message ="$message Remote Host: $IP_HOST \n\n";
$from = "$contact_name <$contact_email>";
$extra_header ="From: $from";
# Target email address
$to ="amid@amid.dk";
# Email Subject
$subject = "Contact form AMID website";
# sends an email
mail($to, $subject, $message, $extra_header, "-f$from");
$contact_name = "";
$contact_email = "";
$contact_phone = "";
$comments = "";
$fromform = "";
?>
Your comment have been sent, thank you for your interest.
}
}else{
$ok_email = 1;
$ok_name = 1;
$ok_comment = 1;
}
?>
# Code modification by Nils ends here
?>

Organization & Staff | Research
| Activities | Publications
& Dissemination
Vacancies & Fellowships | Links & Resources
| Contact AMID | Home

|