php - COdeigniter: This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 -


i'm doing simple thing saving content in database, how i'm getting http error 500. don't know why coming , code not working properly. please have look

controller.php     function register_query()         {             //load registration helper under helper folder             $this->load->helper('registration');               $this->form_validation->set_rules('first_name', 'name', 'required');              $this->form_validation->set_rules('message1', 'message', 'required');             $this->form_validation->set_rules('email', 'email address', 'required');             if ($this->form_validation->run() == true)             {                 $data = array(                 'first_name' => $this->input->post('first_name'),                 'message1' => $this->input->post('message1'),                 'email' => $this->input->post('email'),                 );              }             if ($this->form_validation->run() == true && $this->register_model->register_query($data))             {                      $data['success'] = "your query has been sent successfully... !!";                 $this->load->view('contact',$data);             }         else         {                     $data['success'] = "your query has not been sent successfully... !!";                 $this->load->view('contact',$data);             }          }  model.php     public function query($data)     {         $this->db->insert('queries', $data);          $id = $this->db->insert_id();          return (isset($id)) ? $id : false;           } 

you need give more info 500 response code. check error-log, , update question.

for best error logging experience, set error_reporting -1, turn display_errors off, , set custom error_log. in terminal, type tail -f /path/to/error_log. notices, warnings , errors scroll past in real time, without distorting web page's display.

the quick way have ini_set('display_errors', 'on'); @ top of script.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -