, , "prep", (: trim, xss_clean, strtolower).
, , , return $result , , . :
function _remove_duplicate($str = '')
{
$val = strtolower($str);
$colors = str_getcsv($val);
$result = array_unique($colors);
$result = implode(',', $result);
return $result;
}
, , return FALSE, , , count($colors) === count($result), $result . , , , true/false .
- Form_validation ( ) , , .
"". :
, , , . , :
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'trim|required|matches[passconf]|md5');
$this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
"" , MD5 "xss_clean", .
PHP, , , , htmlspecialchars, trim, MD5 ..
. prepping , , , .
, , , , , , , , , . ( PHP, : CI, .), , Form_validation, .
, : , . , .
, .