Having trouble passing variables on form submission
Posted: Sat Dec 28, 2002 4:07 pm
OK I'm new to the whole PHP scene so go easy on me. I'm trying to pass form variables but it will not work. I'm using Apache 2.0.43, and PHP 4.2.3 Here is my code
testform.html
<HTML><HEAD> <TITLE> Form Handling with PHP </TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <center> <FORM METHOD=POST
ACTION="tellus.php"> <TABLE> <TR height="20"><TD
colspan="2"><FONT SIZE="-1" face="verdana">Below is a Sample
Form for our PHP tutorial</TD></TR> <TR height="50">
<td></td></TR> <TR><TD align="left"><FONT SIZE="-1"
face="verdana"> <b>Your Name <br>Your E-Mail
Address</b></td> <td><INPUT TYPE="text"
NAME="name"><br><INPUT TYPE="text" NAME="email"><p></TD>
</TR> <tr><td colspan="2"><center> <SELECT NAME="opinion">
<option value="is great">I like your site</option> <option
value="is OK">Your Site is OK</option> <option value="is
horrible">Your Site is horrible</option> </SELECT><p><INPUT
TYPE="submit" value="Tell us!"></td></tr>
</TABLE></FORM></BODY></HTML>
<body>
</body>
</html>
*************Here is my PHP code**************
tellus.php
<html>
<body><?
echo "<center><FONT SIZE=-1 face=verdana>"; echo "Greetings $name, thank you for filling out our";
echo "form.";
echo "</center><p><center><TABLE border=0 width=500";
echo "cellspacing=0 cellpadding=7>"; echo "<TR><TD><FONT SIZE=-1 face=verdana>"; echo "In the form, you stated that our site";
echo "$status. Thank you for your input."; echo "We will send you more information about our site";
echo "in an email to $email.";
echo "If you have any more comments, feel free to reply.";
echo "</FONT></TD></TR></TABLE></center>";
?>
</body>
</html>
any help would be greatly apreciated and thanks in advance
testform.html
<HTML><HEAD> <TITLE> Form Handling with PHP </TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <center> <FORM METHOD=POST
ACTION="tellus.php"> <TABLE> <TR height="20"><TD
colspan="2"><FONT SIZE="-1" face="verdana">Below is a Sample
Form for our PHP tutorial</TD></TR> <TR height="50">
<td></td></TR> <TR><TD align="left"><FONT SIZE="-1"
face="verdana"> <b>Your Name <br>Your E-Mail
Address</b></td> <td><INPUT TYPE="text"
NAME="name"><br><INPUT TYPE="text" NAME="email"><p></TD>
</TR> <tr><td colspan="2"><center> <SELECT NAME="opinion">
<option value="is great">I like your site</option> <option
value="is OK">Your Site is OK</option> <option value="is
horrible">Your Site is horrible</option> </SELECT><p><INPUT
TYPE="submit" value="Tell us!"></td></tr>
</TABLE></FORM></BODY></HTML>
<body>
</body>
</html>
*************Here is my PHP code**************
tellus.php
<html>
<body><?
echo "<center><FONT SIZE=-1 face=verdana>"; echo "Greetings $name, thank you for filling out our";
echo "form.";
echo "</center><p><center><TABLE border=0 width=500";
echo "cellspacing=0 cellpadding=7>"; echo "<TR><TD><FONT SIZE=-1 face=verdana>"; echo "In the form, you stated that our site";
echo "$status. Thank you for your input."; echo "We will send you more information about our site";
echo "in an email to $email.";
echo "If you have any more comments, feel free to reply.";
echo "</FONT></TD></TR></TABLE></center>";
?>
</body>
</html>
any help would be greatly apreciated and thanks in advance