Posted by Kevin Raleigh on 05/26/07 23:56
Using this form
<form method="post" action="do_sendfeedback.php">
Your Name: <input type = "text" name="sender_name" size=20><br>
Your email address: <input type="text" name="sender_email" size=30><br>
Did you like this site?<br>
<input type = "radio" name="like_site" value="yes" checked> Yes<br>
<input type = "radio" name="like_site" value="no"> No<br>
<br>
Additional Message: <br>
<textarea name="message" cols=60 rows=10>Your message here!</textarea><br>
<input type="submit" value="Send this form">
</form>
And this collection page:
<?php_track_vars?>
<?php
$msg = "Sender's Full Name: \t$sender_name\n";
$msg.= "Sender's E-Mail:\t$sender_email\n";
$msg.= "Did You Like the Site?\t$like_site\n";
$msg.= "Additional Message:\t$message\n\n";
$mailheaders = "From: My Web Site\n";
$mailheaders.= "Reply-To: $sender_email\n\n";
mail("kraleigh@sbcglobal.net", "Feedback Form", $msg, $mailheaders);
echo "<H1 align=center>Thank You, $sender_name</H1>";
echo"<P align=\"center\">We appreciate your feed back.</P>";
?>
I have errors indicating that my variables don't exist or something like
that
PHP Notice: Undefined variable: sender_name in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 4
PHP Notice: Undefined variable: sender_email in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 5
PHP Notice: Undefined variable: like_site in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 6
PHP Notice: Undefined variable: message in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 7
PHP Notice: Undefined variable: sender_email in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 10
PHP Notice: Undefined variable: sender_name in
C:\Inetpub\wwwroot\phpBasics4.0\do_sendfeedback.php on line 14
can you advise
Kevin
[Back to original message]
|