function PostVar($VarName, $DefVal ="") { $str = $DefVal; if (isset($_POST[$VarName])) $str = $_POST[$VarName]; return $str; } $bContinue = PostVar('SemContinue'); if ($bContinue == 1) { if (!mail("support@coagtrak.com", "Case Submission from CoagTrak Website", "First Name:\t" . PostVar("first_name") . "\n" . "Last Name:\t" . PostVar("last_name") . "\n" . "Email:\t" . PostVar("email") . "\n" . "Phone:\t" . PostVar("phhone") . "\n" . "Company:\t" . PostVar("company") . "\n" . "Office Key:\t" . PostVar("key") . "\n" . "Case Type:\t" . PostVar("type") . "\n" . "Case Subject:\t" . PostVar("subject") . "\n" . "Case Details:\t" . PostVar("detail") . "\n" , "From: support@coagtrak.com\r\n" )) exit("Error requesting info. Please try again later."); //Redirect to thank you screen header("Location: submit-case-confirmation.php"); } ?>