12-11-2014, 03:01 AM
please help, i'll try this code in my localhost is working but not in may hosting server.
PHP Code:
public function register() {
$this->load->library('form_validation');
$this->output->set_content_type('application_json');
$this->form_validation-set_rules('name','UserName','required|min_length[4]|max_length[16]|is_unique[user.username]');
if ($this->form_validation->run() == false){
$this->output->set_output(json_encode([$this->form_validation->error_array()]));
return false;
}
}
www.arthnugraha.com
Learning by doing
Learning by doing