Does anyone know of a good function out there for filtering generic input from forms? Zend_Filter_input seems to require prior knowledge of the contents of the input and I\'
Simple way? Use strip_tags():
$str = strip_tags($input);
You can also use filter_var() for that:
$str = filter_var($input, FILTER_SANITIZE_STRING);
The advantage of filter_var() is that you can control the behaviour by, for example, stripping or encoding low and high characters.
Here is a list of sanitizing filters.