Greetings everyone, I am a really new php coder and I got stuck in a problem while writting a practice code. This is about a Feedback page that sends an email after getting the Feedback.
The error Recieved basically states that the variables are undefined. so That means there is some problem while passing the values of the variables. I really cannot Figure it out. Please help me.
The Feedback Form Page is---
<HTML>
<HEAD>
<TITLE>The Feedback Form</TITLE>
</HEAD>
<BODY>
<FORM method="POST" action="sf.php">
<p>Your Name: <INPUT type="text" name="sender_name" size=20 maxlength=50> </p>
<p>Your Email: <INPUT type="text" name="sender_email" size=20 maxlength=50> </p>
<p>Message: <textarea name="message" cols=30 rows=5></textarea></p>
<p>Do you like this Website:
<INPUT type="radio" name="like_site" value="Yes" checked> yes
<INPUT type="radio" name="like_site" value="No"> no
</p>
<INPUT type="submit" value="SUBMIT">
</FORM>
</BODY>
</HTML>
The Page which is responsible for sending the email is
<HTML>
<HEAD>
<TITLE>The Send Feedback</TITLE>
</HEAD>
<BODY>
<?php_track_vars?>
<?php
$msg="Sender's Full Name:\t $sender_name \n";
$msg.="Sender's Email:\\t$sender_email\n";
$msg.="Did you like the Website?\t$like_site\n";
$msg.="Additional Message:\t$message\n\n";
$mailheaders="From: Lord Sunny's Website";
$mailheaders.="Reply-To: $sender_email\n\n";
mail("
[email protected]", "Feedback Form From--$sender_name",$msg,$mailheaders);
echo"<H1 align=centre> Thank you, $sender_name";
if($sender_name=='yes')
echo"<P align=centre> Thank you for Liking our Website.</p>";
else
echo"<P align=centre> We will try to improve our website as per your feedback.</p>";
?>
</BODY>
</HTML>
Sorry if I am posting this in an inappropiate forum.