Tech Support Forum banner
Status
Not open for further replies.
1 - 1 of 1 Posts

· Registered
Joined
·
1 Posts
Discussion Starter · #1 ·
Please help me as I'm in a right kerfuffle.

I'm trying to make a feedback form work on my website and I keep getting the error page come up everytime I try to test it.

The url for the form is http://www.allykatgraphics.com/contact.htm

The php for this form is hosted on another server that I have as the allykat server does not support php mailing. I have included the php script below:

<?php
/*


$mailto = '[email protected]' ;



$subject = "Website Enquiry - allykatgraphics" ;



$formurl = "http://www.allykatgraphics.com/contact.htm" ;
$errorurl = "http://www.allykatgraphics.com/error.htm" ;
$thankyouurl = "http://www.allykatgraphics.com/thankyou.htm" ;

$uself = 0;



$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email )) {
header( "Location: $errorurl" );
exit ;
}

if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}

$messageproper =

"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;

mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: feedback.php" );
header( "Location: $thankyouurl" );
exit ;

?>

I'm not sure whether its something that I have written in the php or whether its the fact that it is hosted on another website, or that the contact form is in a htm page...

Please help.

Thank you :4-dontkno
 
1 - 1 of 1 Posts
Status
Not open for further replies.
Top