RE: [PHP-WIN] Re: URL querystring values (simple problem)

From: Date: Wed, 07 Aug 2002 20:10:57 +0000
Subject: RE: [PHP-WIN] Re: URL querystring values (simple problem)
Groups: php.windows 
Request: Send a blank email to php-windows+get-15168@lists.php.net to get a copy of this message
Try this: <input type="text" name="example" value="<?php echo $_GET['example'];?>" /> It's easier to use PHP like that instead of 'echo'ing the whole line. -Dash p.s. the $_GET is for 4.2.x with register_globals set (rightly) to off. -----Original Message----- From: Frank Tudor [mailto:ftudor@skychefs.com] Sent: Wednesday, August 07, 2002 12:40 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Re: URL querystring values (simple problem) Here is the code from my test.php page it may seem basic but if my page is called test.php and then I have a url like http://test.php?example=11 why to I get a blank screen shouldn't something generate like the form test tag and then populate anumber 11 in the field? <?php echo "<input type=\"text\" name=\"example\" value=\"{$example}\" />"; ?> ----------------- I have the most basic problem. I am trying to pass a value from a url/querystring like http://test/test.php?example=11 so now how to I get it in a <input type="text" name="example"> on a page called test.php. This must be so simple and I am overdoing it. I am generating this url to be sent in an email to people and I want this value in a form text box to make it easy for the user and all they have to do is hit submit. Thanks, Frank -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#15168) next »