Sometime it just becomes easier to attempt to keep as much out of the global scope as possible and suffer the idea of some of them being globally available.
That being said, if someone was to exploit a script that had global or local access to a variable storing database connection info, then the consequences could be drastic. Similar situations are easly applicable as well, with any crucial data or passwords etc.
You should consider reading the section entitled,
"Security: New Input Mechanism" here: http://www.php.net/release_4_1_0.php
Regards,
Jason k Larson
Dara Dowd wrote:
Is it "better" to pass variables through functions or to simply declare them as global within the function's scope?
The variables in this particular case are things like MySQL database connections and tablenames.
Thanks,Dara
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php