.josh Posted June 15, 2006 Share Posted June 15, 2006 okay, so i am making this function that sanitizes variables, and i thought i'd go the extra step and create another function to log potentially dangerous user input (as in, sql injection attempts, etc..). so my error log is going to pretty much grab any information I can. I can do a foreach on $_SESSION $_POST $_GET and $_REQUEST, but I was wondering, in order to make this function as "all purpose" as possible, if I am able to somehow grab all the miscellaneous variables in play that are not included in those. For instance, say I have the following variables in my script:$x$blah$foobaris there some sort of built in dumpvars() type of function that will access all of these at once, or am I going to have to manually build a string or array with everything in the particular page script in order to make this logging function as "all purpose" as possible? Quote Link to comment https://forums.phpfreaks.com/topic/12052-echoing-all-vars/ Share on other sites More sharing options...
.josh Posted June 15, 2006 Author Share Posted June 15, 2006 solved: okay i found a very handy superglobal called $globals that will do exactly what i want and even cut out some of the legwork, woot! Quote Link to comment https://forums.phpfreaks.com/topic/12052-echoing-all-vars/#findComment-45827 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.