Member
titus
Json response and die combination in PHP 😁
1 2 3 4 5 6 7 8 9 10
if ($this->form_validation->run('admin_login') == FALSE) { if ($this->input->post('ajax')) { die(json_encode(array('success' => 0, 'message' => '', 'errors' => validation_errors()))); } $this->load->view('admin/login/index'); }