Re: URL variables parsing error?
| From: | - Edwin - | Date: | Thu, 18 Sep 2003 10:04:51 +0000 |
| Subject: | Re: URL variables parsing error? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162983@lists.php.net to get a copy of this message | ||
Hi,
hiaer@azrael.sk wrote:
> Hi all,
>
> I use RedHat9.0 with Apache 2.0.40 & PHP 4.2.2
> and I have problem with parsing URL variables...
>
> I use this URL:
> http://my.domain.mine/index.php?var1=value1&var2=value2
>
> and this is my index.php
>
> <?php
> echo "var1: $var1" ;
> echo "var2: $var2" ;
>
> phpinfo();
> ?>
>
> Output of this page is without expansion of my variables var1, var2 at section "echo"
> but phpinfo expand this:
>
> _GET["var1"] value1
> _GET["var2"] value2
>
> Any idea?
Try this:
<?php
echo "var1: {$_GET['var1']}";
echo "var2: {$_GET['var2']}";
phpinfo();
?>
or this:
<?php
echo 'var1: ' . $_GET['var1'];
echo 'var2: ' . $_GET['var2'];
phpinfo();
?>
If it works, check for "register_globals" in the archives:
http://marc.theaimsgroup.com/?l=php-general
HTH,
- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/