You are here: Re: global vars on/off « PHP Programming Language « IT news, forums, messages
Re: global vars on/off

Posted by Erwin Moller on 02/07/07 11:00

Sonnich wrote:

> Hi all!
>
> I was trying to understand this...
> http://www.php.net/manual/en/language.variables.external.php
>
> I wonder what teh community has to say about this...
>
> I need to get some vars something.php?var=blabla... I can get the
> $var, but also $_request["var"].

What do you mean excactly?

Is $_GET["var"] NOT working for you?


> And there is also the file_get_contents('php://input'), but then I
> have to do some more.

No need to complicate things.
PHP will fill the superglobal $_GET just fine for you.
It will also fill $_POST if you receive a form send with Method="POST" (in
the HTML).

And don't use $_request because it doesn't exist, unless you created it in
your script.
Use $_REQUEST instead. :-)
But better: not use $_REQUEST at all, because using it only shows you don't
know where your input comes from (Cookie? Get? Post?). Just use the
superglobal you KNOW will contain the information.

Regards,
Erwin Moller

>
> What do people have to say about this?
>
> S

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация