Joomla: Accessing Request Values

JRequest::get(string Request type)
This will return cleaned sql injection safe array of requested variables. Can request POST, GET, FILES, COOKIE, SERVER request types.


JRequest::getVar(String name,mixed default,String request type)
This will remove all html and trailing spaces. Prevents javascript injection. Can set default value if no value found. Can also force to validate as specific data type.


JRequest::getString(String name,mixed default,String request type)
This will strip html from the string value.

This will return a full url request path

JRequest::getCmd(Str name, Str default, Str Request type)
This strips out everything except alphanumeric and . – _ characters from GET, POST etc….

Leave a comment


  1. The website’s layout don’t render correctly on my Opera browser, you might want to take a look at.