Re: converting scripts for register_globals=Off

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

 



From: "Kim Jacobs (Crooks) - Mweb" <KJacobs@xxxxxxxx>


> 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

If your program is well written, you can get away with just switching $id
for $_REQUEST['id'].

This is assuming you already properly validate and sanitize all of the data
coming from the user. Using $_REQUEST['id'] doesn't make anything more or
less secure, it's a matter of what you're doing with the data coming from
the user.

---John Holmes...

-- 
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