Hello all,
Yes Im a newbie. I only use one feedback form script and have tried to increase the input fields but everything has stopped working.
The form is located on the index.html page and appears fine. When you submit it either with or without the form filled, it just diverts back to the blank index.html page.
Ive done the thankyou.html & nogood.html.
HELP
<?
/*
EDIT THE CONFIGURABLE SECTIONS
*/
// ------------- CONFIGURABLE SECTION ------------------------
$mailto = 'dave@yahoo.co.uk' ;
$subject = "Brochure Request" ;
$formurl = "http://www.sameday.co.uk/index.html" ;
$errorurl = "http://www.sameday.co.uk/nogood.html" ;
$thankyouurl = "http://www.sameday.co.uk/thankyou.html" ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$name = $POST['name'] ;
$email = $POST['email'] ;
$postcode = $POST['postcode'] ;
$number = $POST['number'] ;
$style = $POST['style'] ;
$bedrooms = $POST['bedrooms'] ;
$age = $POST['age'] ;
$value = $POST['value'] ;
$price = $POST['price'] ;
$saletime = $POST['saletime'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($postcode) || empty($number) || empty($style) || empty($bedrooms) || empty($age) || empty($value) || empty($price) || empty($saletime)) {
header( "Location: $errorurl" );
exit ;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
$postcode = strtok( $postcode, "\r\n" );
$number = strtok( $number, "\r\n" );
$style = strtok( $style, "\r\n" );
$bedrooms = strtok( $bedrooms, "\r\n" );
$age = strtok( $age, "\r\n" );
$value = strtok( $value, "\r\n" );
$price = strtok( $price, "\r\n" );
$saletime = strtok( $saletime, "\r\n" );
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This is a set of property details from:\n" .
"\n\n" .
"$http_referrer\n" .
"\n\n" .
"----------------------------------------------------------------\n\n" .
$name .
"\n\n" .
$email .
"\n\n" .
$postcode .
"\n\n" .
$number .
"\n\n" .
$style .
"\n\n" .
$bedrooms .
"\n\n" .
$age .
"\n\n" .
$value .
"\n\n" .
$price .
"\n\n" .
$saletime .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );
header( "Location: $thankyouurl" );
exit ;
?>