I was wondering about the usage of JRequest::clean() vs JRequest::cleanVar()... what is the difference, and when to use which?
I want to sanitize my form input data before I save it to the database, so in my save function would I use something like:
Code: Select all
$data = JRequest::cleanVar( 'post' );
or do I need to include the get(), as in:
Code: Select all
$data = JRequest::cleanVar( JRequest::get( 'post' ) );
or would I use clean() where I've used cleanVar() in these examples? Unfortunately the wiki isn't very helpful for these functions yet. Thanks in advance!