I have inherited some old legacy code that down and dirty uses $_REQUEST
to universally grab all varibales from combined GET and/or POST form
submissions.

So I want to be equally blunt and directly chop up and massage $_REQUEST
before any code handles it.

I want to have an array of acceptable "white list" $_REQUEST variable
names I am looking for, allow those to remain in the $_REQUEST array,
but I want all other $_REQUEST variables removed/destroyed out of
$_REQUEST.

Then simply allow the the remaining "white list" $_REQUEST to flow into
the code.

So, for example I want to do something really short like so:

$whitelist_var_names = array('name', 'address', 'phone');

$_REQUEST = array_intersect_assoc($whitelist_var_names, $_REQUEST);


Can anyone give me a really short code burst, or isolate the proper
array function(s) that will do this for me? 

Thank you one and all, if you can help.


Warmest regards, 
 
Peter Sawczynec 
Technology Dir.
Sun-code.com 
Web related services 
646.316.3678 
[EMAIL PROTECTED]



_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to