Hi to all you clever peeps at PHP Freaks.
This is a great site and i think it's brilliant where everyone is helping everyone else out :-)
I think i've gone blind, i can't see what (probably very simple) error i have in my code:
<html>
<head>
<title>Thanks for sending in your comments. We really appreciate your feedback</title>
</head>
<body>
<h2>If you have requested a reply, then we shall email you within the next 24hours</h2>
<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
$visitors_name = $_POST['VisitorsName'];
$visitors_email = $_POST['VisitorsEmail'];
$reply_requested = $_POST['ContactVisitor'];
$visitors_comments = $_POST[ 'VisitorComments';
$emailto = '
[email protected]';
$subject = 'Visitor Comments From Website';
echo '<br />';
echo '<br />';
echo 'Thanks for using this form.<br />';
echo '<br />';
echo 'Your Name is ' . $visitors_name;
echo '<br />';
echo 'Your Email is ' . $visitors_email;
echo '<br />';
echo 'And you have answered ' . $reply_requested . ' to requesting a reply';
echo '<br />';
echo 'Your comments on our site are - ' . $visitors_comments;
$msg = 'The Visitors Name is ' . $visitors_name . ' and the their email is ' . $visitors_email . ' and in response to requesting a reply back then answered - ' . $visitors_comments . ' and their comments on our site are - ' . $visitors_comments;
echo '<br />';
echo '<br />';
echo $msg;
mail($emailto, $subject, $msg, 'From:
[email protected]');
echo 'Email Sent';
?>
</body>
</html>
It's just a simple bit of code for people to enter comments on one of our websites.
But when we hit submit on the previous html page, I just get the internal server error 500 page.
Please could someone point out my foolishness.
Many Thanks
Stu