Re: basic script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* A Garcia <a.garcia@xxxxxxxxxxxxx>:
> 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@xxxxxxxxxx
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux