<?php
if(isset($_POST['submit'])) {
$to = "cwissler@email.arizona.edu";
$subject = "Service Request";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phone'];
$dept_field = $_POST['dept'];
$ov = $_POST['ov'];

foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}

$body = "From: $name_field\n E-Mail: $email_field\n Phone: $phone_field\n Department: $dept_field\n Project Summary :\n $ov\n $check_msg";

echo "Your information has been submitted to $to!";
mail($to, $subject, $body);
header('Location: http://cals.arizona.edu/art/confirmation.html');
} else {
echo "nofinish";
}
?>