RE: converting scripts for register_globals=Off

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

 



Hi

There are three main types of data passed by the browser - GET POST and
COOKIE.

php creates an array for each type, so what is $id now would also be
$_GET["id"] or $_POST["id"]

There is also $_REQUEST which is a combination of $_GET and $_POST so
$_REQUEST["id"] will also work.

If it were a cookie value it would be $_COOKIE["id"]

When register_globals is off $id will not be defined and only the above
arrays will be usable.

It is generally better practice to use the arrays anyway, so I would suggest
using them all the time.

HTH

Peter







> -----Original Message-----
> From: Kim Jacobs (Crooks) - Mweb [mailto:KJacobs@xxxxxxxx]
> Sent: 29 April 2004 10:40
> To: php-db@xxxxxxxxxxxxx
> Subject:  converting scripts for register_globals=Off
>
>
> if any of you could help me out, I would greatly appreciate it...
> I am an absolute beginner to php (2 weeks now) and dont know what
> I dont know...
>
> I have written some scripts to access my online SQL db and I've
> tested the scripts on my machine with PHP 4.3.6 and register_globals = On
> Now where I host my site, uses PHP 4.3.5 and has register_globals
> = Off which means of course, that my scripts arent working, but I
> dont know why....
>
> My question is, how do I convert my scripts so that they will
> work please? I know that $id and $submit are two of the 'inputs'
> that it doesnt like, but I dont know the rest
>
> Tx
> K
>
>  
> MWEB: S.A.'s most trusted and reliable Internet Service Provider.
> Just Like That.
>
> To join, go to: http://join.mweb.co.za or call 0860032000.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux