hi,
I'm baffled,
this script has always worked up to now, but on the server i'm trying to use it, it doesn't, or more exactly, it does, but it odes not process the "if, elseif,else" conditions properly.
here it is:
<?
if (!isset($email) || !isset($message)) {
header( "Location: http://www.name.com/formscript/contact1.htm" );
}
elseif (empty($email) || empty($message)) {
header( "Location: http://www.name.com/formscript/ez-info_missing_page.htm" );
}
else {
$email = $REQUEST['email'] ;
$message = $REQUEST['message'] ;
$name = $REQUEST['name'] ;
$phone = $REQUEST['phone'] ;
mail( "info@codastar.com", "Web Enquiry",
"Name: $name\n\nEmail Address: $email\n\nPhone: $phone\n\nmessage: $message\n\n", "From: $email");
mail( "$email", "We've received your web Enquiry",
"
Thank you $name,
We have received your form.
We will contact you shortly, or at the time you suggested.
" );
header( "Location: http://www.name.com/formscript/ez-response_page.htm" );
}
?>
basically, if i cut all the if,elseif;else checks, then the post works fine.
my contact page form points to thius script on submit and all emails are sent.
but for some reasons, if i put the checks in, it doesn't.
would you have a different way of saying:
if $email and $name are empty, go to http://www.name.com/formscript/ez-info_missing_page.htm
otherwise, process the form.
that would be great help,
cheers,
Vinny