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

From: Date: Wed, 07 Aug 2002 21:00:19 +0000
Subject: RE: [PHP-WIN] Re: URL querystring values (simple problem)
Groups: php.windows 
Request: Send a blank email to php-windows+get-15173@lists.php.net to get a copy of this message
$varname would work. -Dash -----Original Message----- From: Frank Tudor [mailto:ftudor@skychefs.com] Sent: Wednesday, August 07, 2002 1:59 PM To: php-windows@lists.php.net Subject: Re: [PHP-WIN] Re: URL querystring values (simple problem) So if I have globals on and I need to pass a value what would I do. "Dash Php" <dash.php@westonefcu.org> wrote in message news:ABA3F1F1A223D411BE6C006008A6F7E26046A1@MSX1-PTON... > 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#15173) next »