Page 1 of 1
correct JRequest::getVar sequence?
Posted: Tue Jan 22, 2008 12:25 pm
by ewel
Does anyone know if the bit between brackets below is in the right sequence?
$note_subject = JRequest::getVar('note_subject', 0, 'POST', 'STRING', _J_ALLOWHTML );
Thanks in advance!
Re: correct JRequest::getVar sequence?
Posted: Tue Feb 05, 2008 6:37 pm
by radiant_tech
This should help. From root/libraries/joomla/environment/request.php...
Code: Select all
* The default behaviour is fetching variables depending on the
* current request method: GET and HEAD will result in returning
* an entry from $_GET, POST and PUT will result in returning an
* entry from $_POST.
*
* You can force the source by setting the $hash parameter:
*
* post $_POST
* get $_GET
* files $_FILES
* cookie $_COOKIE
* env $_ENV
* server $_SERVER
* method via current $_SERVER['REQUEST_METHOD']
* default $_REQUEST
*
* @static
* @param string $name Variable name
* @param string $default Default value if the variable does not exist
* @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
* @param string $type Return type for the variable, for valid values see {@link JFilterInput::clean()}
* @param int $mask Filter mask for the variable
* @return mixed Requested variable
* @since 1.5
*/
function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0)