It has a validation word "bingo"
it works fine in Firefox, but in IE instead of going to the "thankyou" page it always send the user to the error page (as if the word wasnt entered...)
Here is the script
Code: Select all
if($word_ok!==false)
{
if($word_ok=="yes")
{
echo die();
} else {
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.....'.$url.'">';
}
}
// Subject of email sent to you.
$subject = 'Results from Contact form';
// Your email address. This is where the form information will be sent.
$emailadd = 'a@a.com';
// Where to redirect after form is processed.
$url = 'http://...';
// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';
// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if(strtolower($_POST['word']) != 'bingo') die();
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>