// trims extra spaces off input
$name = trim($_POST["name"]);
$email = trim($_POST["email"]);
$bldg = trim($_POST["bldg"]);
$room = trim($_POST["room"]);
$port = trim($_POST["port"]);
if ($name != "" & $email != "" & $bldg != "" & $room != "" & $port != "") {
// build the request from the fields
$request = "Requestor - $name\n";
$request .= "Building - $bldg\n";
$request .= "Room - $room\n";
$request .= "Port - $port\n";
$request = stripslashes($request);
//EMAIL PORTION
$to = "cowdint@lanecc.edu,duvalld@lanecc.edu";
$subject = "Hot Port Requested";
mail($to,$subject,$request,"From:$email");
echo ("YOUR REQUEST HAS BEEN EMAILED");
$email = "";
}
else {
// if they submit form with missing fields, remind them
if (isset($_POST['email'])) {
echo ("Complete the entire form please.");
}
}
?>