title: Codeigniter: This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500
body: <p>i'm doing a simple thing saving some content in database, but some how i'm getting this  HTTP ERROR 500.  I don't know why it is coming and my code is also not working properly. Please have a look</p>
  
  <pre><code>Controller.php
      function register_query()
          {
              //load the registration helper under helper folder
              $this-&gt;load-&gt;helper('registration');
  
  
              $this-&gt;form_validation-&gt;set_rules('first_name', 'Name', 'required');
  
              $this-&gt;form_validation-&gt;set_rules('message1', 'Message', 'required');
              $this-&gt;form_validation-&gt;set_rules('email', 'Email Address', 'required');
              if ($this-&gt;form_validation-&gt;run() == true)
              {
                  $data = array(
                  'first_name' =&gt; $this-&gt;input-&gt;post('first_name'),
                  'message1' =&gt; $this-&gt;input-&gt;post('message1'),
                  'email' =&gt; $this-&gt;input-&gt;post('email'),
                  );
  
              }
              if ($this-&gt;form_validation-&gt;run() == true &amp;&amp; $this-&gt;Register_Model-&gt;register_query($data))
              { 
                      $data['success'] = "Your Query has been sent successfully... !!";
                  $this-&gt;load-&gt;view('contact',$data);
              }
          else
          {
                      $data['success'] = "Your Query has not been sent successfully... !!";
                  $this-&gt;load-&gt;view('contact',$data);
              }
  
          }
  
  Model.php
      public function query($data)
      {
          $this-&gt;db-&gt;insert('queries', $data);
  
          $id = $this-&gt;db-&gt;insert_id();
  
          return (isset($id)) ? $id : FALSE;      
      }
  </code></pre>