Jump to content

echoing all vars


.josh

Recommended Posts

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

is 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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.