l3vi
03-09-2003, 03:52 PM
Im just starting out w/ php and im trying to do this code as a test, but I cant get it to work. It will always say something like this: Notice: Undefined variable: Comments in c:\program files\apache group\apache\htdocs\infor.php on line 6. Can anyone help me out with this? BTW, here is the code I used for the Form...
<form action="infor.php" method=POST>
First Name: <input type=Text name="FirstName"><br>
Last Name: <input type=Text name="LastName"><br>
Email: <input type=Text name="Email"><br>
Comments: <textarea name="Comments" rows=10 cols=50></textarea><br>
<input type="submit">
</form>
and here is the code I used for the PHP script.
<?
print("Your first name is $FirstName");
print("Your last name is $LastName");
print("Your Email is $Email");
print("This is what you had to say: $Comments");
?>
<form action="infor.php" method=POST>
First Name: <input type=Text name="FirstName"><br>
Last Name: <input type=Text name="LastName"><br>
Email: <input type=Text name="Email"><br>
Comments: <textarea name="Comments" rows=10 cols=50></textarea><br>
<input type="submit">
</form>
Thanx in advance!:thumbsup:
<form action="infor.php" method=POST>
First Name: <input type=Text name="FirstName"><br>
Last Name: <input type=Text name="LastName"><br>
Email: <input type=Text name="Email"><br>
Comments: <textarea name="Comments" rows=10 cols=50></textarea><br>
<input type="submit">
</form>
and here is the code I used for the PHP script.
<?
print("Your first name is $FirstName");
print("Your last name is $LastName");
print("Your Email is $Email");
print("This is what you had to say: $Comments");
?>
<form action="infor.php" method=POST>
First Name: <input type=Text name="FirstName"><br>
Last Name: <input type=Text name="LastName"><br>
Email: <input type=Text name="Email"><br>
Comments: <textarea name="Comments" rows=10 cols=50></textarea><br>
<input type="submit">
</form>
Thanx in advance!:thumbsup: