$submitted = checkSubmittedValues("SubmitButton");
if ($submitted)
{
$allOK = true;
$requiredOK = ( checkSubmittedValues("Name") && checkSubmittedValues("Company") && checkSubmittedValues("City") && checkSubmittedValues("State") && checkSubmittedValues("Country") && checkSubmittedValues("Telephone") && checkSubmittedValues("Email") );
// && checkSubmittedValues("Fax") && checkSubmittedValues("Zip") && checkSubmittedValues("Address")
if( ! $requiredOK )
{
$message = "Please fill all fields marked with **.";
$allOK = false;
}
if( $allOK )
{
$emailAddress = getRequestOrValue("Email", "");
$emailOK = ereg(".*@[^\.].*\..*", $emailAddress);
if (!$emailOK)
{
$message = 'Email address is not valid.';
$allOK = false;
}
}
if( $allOK )
{
$numericOK = ( isNumeric(getRequestOrValue("Telephone", "")) && isNumeric(getRequestOrValue("Fax", "")) );
if( ! $numericOK )
{
$message = "Only numbers are allowed (no spaces or dashes) for the telephone and fax fields.";
$allOK = false;
}
}
if( $allOK )
{
$alphaOK = ( isAlpha(getRequestOrValue("Name", "")) && isAlpha(getRequestOrValue("State", "")) );
if( ! $alphaOK )
{
$message = "Please enter do not enter numbers in Name and State fields.";
$allOK = false;
}
}
if( $allOK )
{
$text = "";
foreach($HTTP_POST_VARS as $field => $value)
$text .= ($field != "SubmitButton") ? str_replace("_", " ", $field).": ".$value."\n" : "";
//print (nl2br($text));
@mail("larisaz@serbiantranslator.com", "Web site contact form", $text); //bojan@bjelic.net
print '
![](img/icon-ok.gif)
Email has been sent, we will reply soon.
';
}
else
print '
![](img/icon-error.gif)
'.$message.'
';
}
?>
Free quote
If you have a translation project for multiple target languages, please list all the languages in the comment box on the form below.
The starred ** fields must be included.