Help (PHP)

Associate
Joined
3 Oct 2003
Posts
611
Location
Northampton,UK
Hi guys,

Iv'e started to learn php today and i have run into a few problems.

Im following a php book and have tryed an simple php html form example.

I have made 2 pages one html page with input forms and a php page which outputs the variables that the user entered. The code for both is:

<HTML>

<HEAD>
<TITLE> HTML TEST FORM </TITLE>
</HEAD>

<BODY>

<FORM ACTION="HandleForm.php" METHOD="POST">

FIRST NAME <INPUT TYPE=TEXT
NAME="FirstName" SIZE=20><br>

Last Name <INPUT TYPE=TEXT
NAME="LastName" Size=40><br>

E-mail Address <INPUT TYPE=TEXT
NAME="Email" SIZE=60><br>

Comments <TEXTAREA NAME="Comments" ROWS=5 COLS=40></TEXTAREA><br>
<br>

<INPUT TYPE=SUBMIT NAME="SUBMIT" VALUE="Submit!"

</FORM>
</BODY>
</HTML>

And the php page that handles the information is suppost to just echo the data back to the user:

<html>

<title> Results </title>

<?php echo $FirstName; ?>
<?php echo $LastName; ?>
<?php echo $Email; ?>
<?php echo $Comments; ?>


</html>

However when running these and clicking submit no data is displayed on the screen as if the variables are empty!

What have i done wrong!

Cheers,

Eddie
 
Back
Top Bottom