$id = JRequest::getVar('id', 0);
$email = JRequest::getVar('email', '', 'post', 'string', JREQUEST_ALLOWRAW | JREQUEST_NOTRIM); $email = JFilterInput::getInstance()->clean($email, 'email');
$allowed_values = ['red', 'green', 'blue']; $color = JRequest::getVar('color', 'red', 'get', 'string', JREQUEST_ALLOWRAW); if (!in_array($color, $allowed_values)) { $color = 'red'; }The JRequest class is part of the Joomla Framework package.