|
Posted by Fred!head on 05/30/07 05:43
Hi,
Probably this is a newbie question so I appreciate you bearing with
me.
I've got an application where users can create forms with name= values
they define. I'd like to write a script that traverses the $_REQUEST
array to pull out each form value and put it into a simple comma-
delimited feed they can then download as a CSV file. However, I see
the $_REQUEST array is junked up with lots of form values, some I've
heard of (PHPSESSID) and other mystery keys (e.g. dbx-pagemeta,
__utmz).
My question: how do I programmatically avoid these junk values so they
don't wind up in my feed? Can I create and maintain an array of these
junk keys then use that array as a filter to sort out only the
$_REQUEST keys/values that are different? I tried array_diff() and
array_intersect() but neither gave me the results I wanted. And using
a long set of conditional operators (e.g. || and XOR) worked only if I
had 2-3 conditions; more than that let in every $_REQUEST key/value
pair.
Any ideas how to do this in a way that lets my users have the
flexibility of naming their form fields?
Thanks in advance for any help and/or insight!
Tim
Navigation:
[Reply to this message]
|