Ok... Here is the code... Sorry if it may seem a bit whack. As I mentioned before I am a newb... What should I do to this code to make it save the form results in the event the user fails to input all data. Thanks in advance
<?php
$mailto = 'jcollins@mainstreamwebsolutions.com' ;
$subject = "Event Request" ;
$formurl = "http://www.mainstreamwebsolutions.com/planner.html" ;
$errorurl = "http://www.mainstreamwebsolutions.com/error.html" ;
$thankyouurl = "http://www.mainstreamwebsolutions.com/thank you.html" ;
$uself = 0;
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$contact = $POST['contact'] ;
$email = $POST['email'] ;
$phone = $POST['phone'] ;
$type = $POST['type'] ;
$location = $POST['location'] ;
$month = $POST['month'] ;
$day = $POST['day'] ;
$year = $POST['year'] ;
$time = $POST['time'] ;
$number = $POST['number'] ;
$attire = $POST['attire'] ;
$setting = $POST['setting'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($contact) || empty($email) || empty($phone) || empty($location)) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of Contact: $contact\n" .
"Contact E-mail: $email\n" .
"Phone Number: $phone\n" .
"Event Type: $type\n" .
"Date of Event: $month $day $year\n" .
"Time of Event: $time\n" .
"Location of Event: $location\n" .
"Number of Guests: $number\n" .
"Event Setting: $setting\n" .
"DJ Attire: $attire\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$contact\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: contact us.php 2.08" );
header( "Location: $thankyouurl" );
exit ;
?>