########## CODE ###############
$name=trim($_POST['name']);
$ssn=trim($_POST['ssn']);
$phone=trim($_POST['phone']);
$email=trim($_POST['email']);
$department=trim($_POST['department']);
$course=trim($_POST['course']);
$section=trim($_POST['section']);
$semester=trim($_POST['semester']);
$comments=trim($_POST['comments']);
$lastdate=trim($_POST['lastdate']);
$process=trim($_POST['process']);
$action=trim($_POST['action']);
$more=trim($_POST['more']);
$payment=trim($_POST['payment']);
# check if the email address contains the @ sign. If it does not, the emailcheck variable will be empty
$emailcheck = strpos($email, "@");
if ( ($process == "sent") && ($name =="") )
{
echo "Please enter your name
";
$continue="no";
}
if ( ($process == "sent") && ($ssn =="") )
{
echo "Please enter your Social Security Number
";
$continue="no";
}
if ( ($process == "sent") && ($phone =="") )
{
echo "Please enter your phone number
";
$continue="no";
}
if ( ($process == "sent") && ($email =="") )
{
echo "Please enter your e-mail address
";
$continue="no";
}
else
{
if ( ($process == "sent") && ($emailcheck =="") )
{
echo "The e-mail address that you entered is not correct
";
$continue="no";
}
}
if ( ($process == "sent") && ($action =="") )
{
echo "Please select whether to Add or Drop the class
";
$continue="no";
}
if ( ($process == "sent") && ($more =="") )
{
echo "Please select whether you are submitting more requests
";
$continue="no";
}
if ( ($process == "sent") && ($department =="") )
{
echo "Please enter a department
";
$continue="no";
}
if ( ($process == "sent") && ($course =="") )
{
echo "Please enter a course number
";
$continue="no";
}
if ( ($process == "sent") && ($semester =="") )
{
echo "Please enter a semester
";
$continue="no";
}
if ( ($process == "sent") && ($action=="Drop") && ($lastdate =="") )
{
echo "Please enter your last day of participation in this class
";
$continue="no";
}
if ( ($process == "sent") && ($payment =="") && ($action =="Add") )
{
echo "You are adding a class, please enter a form of payment
";
$continue="no";
}
if ( ($process == "sent") && ($continue!= "no") )
{
$date= date("m/d/Y H:i", mktime());
$comments = str_replace("\n","
",$comments);
$comments = str_replace("\n","
",$comments);
$comments = str_replace("\'","'",$comments);
$comments = str_replace('\"','"',$comments);
$message = '
Comments: "; $message .= $comments; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$email."\r\n"; $headers .= "To: vcadd-drop@fhsu.edu\r\n"; $headers .= "Reply-To: ".$email."<".$email.">\r\n"; $headers .= "Subject: ".$action." Request\r\n"; $headers .= "X-Mailer: VD Add Drop Email system"; mail("", $action." Request", $message, $headers); $message = "DO NOT REPLY TO THIS EMAIL. REPLIES ARE NOT MONITORED.
"; $message .= "The following request has been successfully received and will be processed. Please allow 2-3 business days for processing. Virtual College personnel will contact your advisor and instructor regarding your request. Adding a course is subject to the discretion of the instructor when space is available and successful completion of the course is possible by the end of the term. You may check the status of your enrollment at http://tigertracks.fhsu.edu
";
$message .= "
Action: ".$action;
$message .= "
Department: ".$department;
$message .= "
Course #: ".$course;
$message .= "
Section: ".$section;
$message .= "
Semester: ".$semester;
$message .= "
Year: ".$year;
$message .= "
Submitting more: ".$more;
if ($action=="Add")
{
$message .= "
Form of payment: ".$payment;
}
if ($action=="Drop")
{
$message .= "
Last day of participation: ".$lastdate;
}
$message .= "
Comments: ";
$message .= $comments;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: vcnotify@fhsu.edu\r\n";
$headers .= "To: ".$email."\r\n";
$headers .= "Subject: ".$action." Request\r\n";
$headers .= "X-Mailer: VD Add Drop Email system";
mail("", $action." Request", $message, $headers);
echo "Thank you!
";
echo "Your request has been received and will be time stamped as of today’s date (".$date= date("m/d/Y", mktime())."). A summary of your request has also been e-mailed to you. Please allow 2-3 business days for processing. Virtual College personnel will contact your advisor and instructor regarding your request. Adding a course is subject to the discretion of the instructor when space is available and successful completion of the course is possible by the end of the term. You may check the status of your enrollment at http://tigertracks.fhsu.edu
"; echo "
You may enter another request or, if you are finished, close this window."; $action=""; $department=""; $course=""; $section=""; $comments=""; } echo '
'; echo ''; ?>


















