i am trying to send an email with a simple script but I'm getting an unexpected t_variable error and i checked the code multiple of times but i didn't find the error...i would appreciate it if you help me!
here's the code
<?php
if(isset($_POST['email'])) {
$time = "unchecked";
$selected_radio = $_POST['when'];
if ($selected_radio == "flexible") {
$time = "flexible";
}
elseif ($selected_radio == "hour") {
$time = "within the hour";
}
elseif ($selected_radio == "date") {
$time = "at a specific date";
}
$where = $_POST['addressField'];
$remote_check_box = $_POST['remoteCheckBox'];
$comments = $_POST['needTextArea'];
$who = $_POST['helpNeeded'];
$email_message = "Form details below.\n\n";
}
$email_message .= "Who do you need: ".$who."\n";
$email_message .= "When should they start ".$time."\n";
$email_message .= "Where: ".$where." \n";
$email_message .= "Job can be performed remotely: ".$remote_check_box."\n";
$email_message .= "Comments: ".$comments."\n";
$headers = 'From: webmaster@fanara.co' . "\r\n" .
'Reply-To: webmaster@fanara.co' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$email_to = "zsalloum@aucegypt.edu";
$email_subject = "request a service";
mail($emailto, $emailsubject, $email_message, $headers);
?>
<!-- include your own success html here -->
Thank you for contacting us. We will be in touch with you very soon.
<?php
}
?>


i hope that solves it!