check($captchaCode); if (trim($sEmail) == "" || Common::IsEmailValid($sEmail) !== true || trim($sSubject) == "" || trim($sBody) == "") { $blnErrorsFound = true; $strError = "requiredFields"; } else if ($securimage_valid !== true) { $blnErrorsFound = true; $strError = "invalidCode"; } else { $mailheaders = "From: Safari Computer Systems \r\n"; $mailheaders .= "Reply-To: $sEmail\r\nX-Mailer: PHP" . phpversion() . "\r\n"; $body = "Name: $sName\nE-mail address: $sEmail\n\n"; $body .= "IP Address: " . $_SERVER["REMOTE_ADDR"] . "\n"; $body .= "\n"; $body .= "Message:\n---------------------------------\n"; $body .= $sBody . "\n"; $sSubject = "[Contact Form] " . $sSubject; //SEND MAIL $to = "tsolin@safaricomputers.com"; $mailSuccess = mail($to, $sSubject, $body, $mailheaders, "-f tsolin@safaricomputers.com"); if (!$mailSuccess) { $blnErrorsFound = true; $strError = "emailSendError"; } else { $blnErrorsFound = false; } } } ?>

Your message has been sent, thank you.

Return to the Safari Computer Systems Work Portfolio


'; switch ($strError) { case "requiredFields": echo "Please enter a valid e-mail address, subject, and message."; break; case "emailSendError": echo "Your message could not be sent, please try again."; break; case "invalidCode": echo "The code you have entered is incorrect, please try again."; break; } echo ''; echo '
'; } ?>
Name
E-mail Address
Subject
Message
Code
Enter the code shown in the image below to submit this form (just making sure you're a human...)
Generate a new code
Listen to the code