Jump to content

Display form data in new page.


Matt_S

Recommended Posts

Hello all.

I am trying to display values from an html form in a new browser window.

Basically creating a lineup in an html form and trying to pull the values into a different page in a separate browser instance.

My submission page form code looks like:
 

<form name="lineupform" action="lineup.php" method="get">
<p>
Name: <input type="text" size="20" name="n1"><br /><br />
Name: <input type="text" size="20" name="n2"><br /><br />
Name: <input type="text" size="20" name="n3"><br /><br />
<input TYPE="SUBMIT" CLASS="button" value="SUBMIT LINEUP" />  <input type="reset" value="RESET LINEUP" class="button2" /></p>
</form> 

And then using the following to retrieve and display the information in a different browser window:
 

	<?php echo $_GET['n1']; ?><br />
	<?php echo $_GET['n2']; ?><br />
	<?php echo $_GET['n3']; ?><br /> 

I'm not getting any results and even redirecting the same browser window to the lineup.php does not display anything.

 

Any help would be appreciated.

 

 

Link to comment
Share on other sites

You're right.

I don't get it. If you mean the actual input value, I showed the form code (not the whole page's code) so there is no value. If you mean the form value=" ", it is not needed with the text input type since there is no default value.

 

But thanks for that quick reply and warm welcome. I hope you aren't that condescending will all newbs that come looking for help.

 

I'll try elsewhere.

Link to comment
Share on other sites

I took what you wrote literally. You used the wrong terminology.

 

trying to display values from an html form

 

It would have been more clear if you said "display form input". Values and form input is two separate things.

 

There is actually nothing wrong with the code.

Edited by benanamen
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.