Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data will not transfer from one form to another 1

Status
Not open for further replies.

likelylad

IS-IT--Management
Jul 4, 2002
388
GB
Could someone help me out on this one it is driving me absolutely mad!!!!!!!!!!!!!!![curse]

On the first form it asks for first name and last name.
It then opens a second form that prints the information on screen.

What is happening is that the second form is opening but the information from the first form (the variables) are not showing.

I have the following php file called testing.php

<html>
<body>

<form action=&quot;testing1.php&quot; method=post>
First name:<input type=&quot;Text&quot; name=&quot;first&quot;><br>
Last name:<input type=&quot;Text&quot; name=&quot;last&quot;><br>
<input type=&quot;Submit&quot; name=&quot;submit&quot; value=&quot;Enter information&quot;>

</form>

</body>
</html>

As you can see it opens a second file called testing1.php and it contains the following code.

<html>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>

<p>
First Name<?php print $first; ?>

<p>
Last Name <b> <?php print $last; ?> !?! </b>


</body>
</html>

 
Try
<?php print $_POST[first]; ?>
and
<?php print $_POST[last]; ?>
______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top