Matt_S Posted April 22, 2017 Share Posted April 22, 2017 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. Quote Link to comment Share on other sites More sharing options...
benanamen Posted April 22, 2017 Share Posted April 22, 2017 Values? What values? You completely left them out. Quote Link to comment Share on other sites More sharing options...
Matt_S Posted April 22, 2017 Author Share Posted April 22, 2017 The text values from the form input elements. They are named n1, n2, etc. Quote Link to comment Share on other sites More sharing options...
benanamen Posted April 22, 2017 Share Posted April 22, 2017 You don't seem to get it. There are no values. Go back and learn basic, basic, basic html. Quote Link to comment Share on other sites More sharing options...
Matt_S Posted April 22, 2017 Author Share Posted April 22, 2017 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. Quote Link to comment Share on other sites More sharing options...
benanamen Posted April 22, 2017 Share Posted April 22, 2017 (edited) 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 April 22, 2017 by benanamen Quote Link to comment Share on other sites More sharing options...
benanamen Posted April 22, 2017 Share Posted April 22, 2017 OP was trying to run script from the C:\ path and not through the server localhost. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.