Len Whistler
04-26-2003, 09:25 PM
Hello Everyone:
I have a feedback form at http://www.stubby.ca/contact.htm that doesn't work. The PHP code is below and I get an error on line 8 message. Both the .php file and the form .htm file are in the same directory as my index.htm page.
Also when I work with a .php file in Notepad amd try and save it with the .php extension the .txt extension also gets added, example: feedback.php.txt
Thanks
Leonard Whistler
www.stubby.ca
<?
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl = "http://www.stubby.ca/contact.htm");
exit ;
}
if (empty($name) || empty($email) || empty($comments))
{
header( "Location: $errorurl = "http://www.stubby.ca/error.htm");
exit ;
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS
-------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n"
;
mail($mailto = 'lwhistler@yahoo.com', $subject = "Feedback Form", $messageproper, "From:
\"$name\" <$email>\nReply-To: \"$name\"
<$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl = "http://www.stubby.ca/thankyou.htm");
I have a feedback form at http://www.stubby.ca/contact.htm that doesn't work. The PHP code is below and I get an error on line 8 message. Both the .php file and the form .htm file are in the same directory as my index.htm page.
Also when I work with a .php file in Notepad amd try and save it with the .php extension the .txt extension also gets added, example: feedback.php.txt
Thanks
Leonard Whistler
www.stubby.ca
<?
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl = "http://www.stubby.ca/contact.htm");
exit ;
}
if (empty($name) || empty($email) || empty($comments))
{
header( "Location: $errorurl = "http://www.stubby.ca/error.htm");
exit ;
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS
-------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n"
;
mail($mailto = 'lwhistler@yahoo.com', $subject = "Feedback Form", $messageproper, "From:
\"$name\" <$email>\nReply-To: \"$name\"
<$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl = "http://www.stubby.ca/thankyou.htm");