Re: basic script

From: Date: Wed, 10 Nov 2004 13:12:12 +0000
Subject: Re: basic script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201662@lists.php.net to get a copy of this message
* A Garcia <a.garcia@imb.uq.edu.au>: > I just want the URL that is on the navigator bar be > printed... this is my script but it just does not do it... > why,.. please help, cheers > <HTML> > <TITLE>First Variables Example</TITLE> > <BODY> > > <?php echo "VALUE IS: $x";?> > > </BODY> > > </HTML> Not exactly sure what you're trying to accomplish here, but if you're trying to get something like: http://localhost/script.php?x=2 to then print VALUE IS: 2 it most likely won't work with recent versions of PHP (e.g., PHP >= 4). This is because the default settings in the php.ini file have register_globals turned off for security reasons. You can still accomplish that you want to do; simply change the php line to: <?php echo "VALUE IS: " . $_GET['x']; ?> If that's not what you're trying to do... explain in more detail. -- Matthew Weier O'Phinney | mailto:matthew@garden.org Webmaster and IT Specialist | http://www.garden.org National Gardening Association | http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org

« previous php.general (#201662) next »