I'm running CodeIgniter for a project of mine ... I have the standard form validation checks for my form, except I'm unsure of how to check if the value already exists in the database.
This is what I have for my form validation rules so far:
$this->form_validation->set_rules('rolename', 'Role Name', 'trim|required|xss_clean');
$this->form_validation->set_rules('rolekey', 'Role Key', 'trim|required|xss_clean');
The 'rolekey' is what I need to check against the 'rolekey' column in the database to see if it exists, if it does I need to shoot back an error.