Sorry, the form is set up this way:
<form name="form1" method="post" action="contact_dispute.php" id="form1">
The "contact_dispute.php" file is here:
<?
##### SETTINGS ################################################
$mailto[] = 'example1@example.com','example2@example.com';
$domain = "sandman.ristech.net";
$filename = "contact_dispute.csv";
$thankyoupage = "thanks.html";
$email_from = "Dispute Form Submission";
$email_reply = "noreply@example.com";
$campaign = $_SERVER['HTTP_REFERER'];
$subject = "Response from: " . $campaign . "";
###############################################################
#if ($_POST['ipaddress'] == $_SERVER['REMOTE_ADDR'])
if (1 != 2)
{
$fields['datetime'] = date('Y-m-d H:i:s');
$fields['IP'] = $_SERVER['REMOTE_ADDR'];
$fields['Campaign'] = $campaign;
foreach ($_POST as $key => $value)
{
$fields[$key] = trim($value);
unset($fields['imageField_x']);
unset($fields['imageField_y']);
unset($fields['Submit']);
unset($fields['ipaddress']);
}
foreach ($fields as $key => $value)
{
$email_text .= "$key: $value\n";
}
$file_text = '"' . implode('","', $fields) . "\"\r\n";
if (isset($fields['name']))
{
$name = $fields['name'];
}
else
{
$name = $fields['first_name'] . " " . $fields['last_name'];
}
if (is_writable($filename))
{
if ($fileid = fopen($filename, "a"))
{
fwrite($fileid, $file_text);
fclose($fileid);
}
else
{
echo "Cannot open file.";
}
}
else
{
echo "File not writable.";
}
mail(implode(',', $mailto), $subject, $email_text, "From: \"$email_from\" <$email_reply>");
header("Location: $thankyoupage");
exit;
}
else
{
die("You have reached this page an error. Please <a href='http://$domain'>click here to continue</a>");
}
?>
When the form is submitted, the user is taken to this file which shows blank. So it is not being processed and sending the user to thank you page. There are 3 forms identical to this. Just on different pages.
Any help is appreciated.
JJ