|
-
Apr 18th, 2003, 05:15 AM
#1
Globals
I've just installed Apache and PHP on this notebook...
While editing the php.ini file, I went in to set globals as on, but I read a little warning on top:
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = On
Nevertheless, I've set it to on, because on some of my php pages, I am doing the following:
if the URL is like
http://localhost/show.php?id=28
I get the value of id using global. Suppose id=28, then I search for a file named 28.php and include it in show.php.
So, you can see that I do require globals to be on in this case.
Is there an alternative to this? How can I pass the value 28 to show.php without having to use globals? Any other suggestions?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|