Avoid filter_input for compatibility with PHP < 5.2.

This change avoids filter_input(), for systems with older PHP versions like RHEL/Centos 5.X.