Last: $lname
DegYr: $degyr
Company: $company
Email: $email
Phone: $phone
Guest Fname: $guest_fname
Guest Lname: $guest_lname
Guest DegYr: $guest_degyr
Street1: $street1
Street2: $street2
City: $city
State: $st
Zip: $zip
Football1: $football1
Football2: $football2
Notes: $notes
"; } // Insert these values into the CSV file. $file = fopen($filepath, "a") or exit("ERROR: Unable to open file!"); $towrite = $cfname . "," . $clname . "," . $cdegyr . "," . $ccompany . "," .$cemail . "," . $cphone . "," . $cguest_fname . "," . $cguest_lname . "," . $cguest_degyr . "," . $cstreet1 . "," . $cstreet2 . "," . $ccity . "," . $cst . "," . $czip . "," . $football1 . "," . $football2 . "," . $cnotes . "\n"; if ($BUG) { echo $towrite . "
"; } else { fwrite($file, $towrite); } fclose($file); // Send the confirmation email $to = $email; $subject = "ME Football Confirmation"; $message = "This is a confirmation that you have submitted your request for the ME Football Invitation site. Following is a record of your submission. Primary Game: $football1 Secondary Game: $football2 Contact Information: $fname $lname $degyr $company $email $phone Guest Information: $guest_fname $guest_lname $guest_degyr Mailing Address: $street1 $street2 $city, $st $zip Additional Notes: $notes If you have any questions, please contact Tom Lawley at tom.lawley@me.gatech.edu"; $from = "do-not-reply"; $headers = "From:" . $from; mail($to, $subject, $message, $headers); ?>

If you see no error messages above, then your submission has been successfully submitted!

You should receive a confirmation email shortly.

One or more required fields have been left blank."; echo "

Please use your browser button to go back and resubmit the form.

"; } ?>