Can someone please look at my codes for any misteakes. When I run feedback.html, which is suppose to send everything to processfeedback, I get the actual php codes for "processfeedback" on my browser window.
<html>
<head>
<title>Bob's Auto Parts - Customer Feedback</title>
</head>
<body>
<h1>Customer Feed Back</h1><br />
Please tell us what you think
<form action="processfeedback.php" method="post">
Your name <br />
<input type="text" name="name" size="40" /><br />
Your email address<br />
<input type="text" name="email" size="40" /><br />
Your feedback<br />
<textarea rows="5" cols="30" name="feedback"></textarea><br />
<input type="submit" value="Send feedback" size="40" />
</form>
</body>
</html>
This is processfeedback:
<?php
//create short variable
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$feedback =$_REQUEST['feedback'];
$toaddress = 'masood131@yahoo.com';
$subject = 'Feedback from web site';
$mailcontent = 'Customer name: '.$name."\n"
.'Customer email: '.$email."\n"
."Customer comments: \n".$feedback."\n";
$fromaddress = 'From: [email]masood131@yahoo.com[/email]';
if(mail($toaddress, $subject, $mailcontent, $fromaddress) === false) {
echo "There was an error sending the email.";
}
else {
echo "Your messege was sent.";
}
?>
<html>
<head>
<title>Bob's Auto Parts- Feedback Submitted</title>
</head>
<body>
<h1>Feedback Submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>
ty