note 14538 deleted from function.parse-url by jimw

From: Date: Fri, 21 Dec 2001 00:40:39 +0000
Subject: note 14538 deleted from function.parse-url by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23666@lists.php.net to get a copy of this message
[Editor's Note: 1) The easiest option is to put register_globals = on in the php.ini, but if you don't you can put this thing at the top of each script... (You can replace HTTP_GET_VARS with HTTP_POST_VARS, HTTP_COOKIE_VARS, etc...If you need data from 2 or more of these arrays parsed, you will need to put that number of this script (one for HTTP_GET_VARS, HTTP_POST_VARS, etc... It would probably be good to create a script called "globals.php" with this script in it, and just type require("globals.php") whenever you need it. while (list($key,$value)=each ($HTTP_GET_VARS)){ $$key=$value; } --Andy andy@php.net (Please email me if you have any questions. ] My web hosts reckon that it's safer to switch off the ability to type query strings after the url, so that people can't hack into your data. This is causing me heaps of problems, as all the books, scripts etc just call variables from the previous page or from forms, but instead they say i have to use $HTTP_POST_VARS[my_variable] This also means that i can't do queries with links on my pages e.g.http://www.mywebsite.com/contacts.php?action=add and calling session variables doesn't seem to work either and it's doing my head in and I'm having to find obscure ways of doing stuff, like this parse_url etc. What do you guys think about this? are they being overly paranoid and making me type more code than i need to and overly complicating things for a newbie? I agree with whoever said above that having to use parse_url is missing the point. Surely my database will be safe if the add/modify/delete pages are protected? i do have access to php.ini, so i could change the config, but my server people have advised me not to. opinions/help appreciated!

« previous php.notes (#23666) next »