Re: Re: sending variables
| From: | Ben Peter | Date: | Tue, 20 Feb 2001 09:11:44 +0000 |
| Subject: | Re: Re: sending variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40719@lists.php.net to get a copy of this message | ||
No,
PHP makes get variables available in $HTTP_GET_VARS. Thus, Rosen can
access his variable as $HTTP_GET_VARS['rosen'].
If register_globals is true, the variable is also available in the
global scope as $rosen (as in Rosen's example).
If this does not work, it would seem that register_globals is not set.
Rosen, could you perhaps put something around the output in test1.php
and post that? Something like:
<? print(" The value of \$rosen is: $rosen ."); ?>
Also, please tell us which version of PHP you're using.
Cheers,
Ben
Ifrim Sorin wrote:
>
> In test1.php you shoul have
>
> <?
> $qry=getenv("QUERY_STRING");
> $rosen=substr($qry,6);
> print("$rosen");
> ?>
>
> Sorin Ifrim
>
> Rosen <rosen_dm@dir.bg> wrote in message
> news:96tdvp$oo7$1@toye.p.sourceforge.net...
> > Hi,
> > I have two simple php files:
> >
> > main.php:
> > <A HREF="test1.php?rosen=11">LIST</A>
> >
> > test1.php:
> >
> > <?print("$rosen");?>
> >
> >
> >
> > But this doesn't work !
> >
> > please HELP !
> >
> >
> >
> > Rsen Marinov
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net