Is there any way of passing all vars on a page to a function, say instead of doing this
$var = htmlspecialchars($var); $var1 = htmlspecialchars($var1); $var2 = htmlspecialchars($var2); etc etc.
any help would be much appreciated.
HTTP_POST_VARS array, HTTP_GET_VARS array, etc. read up on those.
And then read up on the foreach statement...
http://www.php.net/manual/en/control-structures.foreach.php
Mal
or the list/each.... 😉
figured it out... here it is for anyone else who might need it
while(list($key, $val) = each($HTTP_POST_VARS)) { $$key = htmlspecialchars($val); }