title: how to show insert update messages on same page in codeigniter
body: <p>When I am inserting or updating data in Codeigniter I want to show a message whether data is inserted or updated my message is already showing in controller but I want to show it on view page. And I don't want to redirect during update and insertion.</p>
  
  <p><strong>here is my update time code in Controller i.e. showing message</strong>.</p>
  
  <pre><code>if($result)
      {
              $this-&gt;load-&gt;view('includes/header');
              $this-&gt;load-&gt;view('includes/menu');
              echo "&lt;div class='success'&gt;";
              echo "Successfully Updated";
              echo "&lt;/div&gt;";
  
              redirect(current_url());
  
       }
      else 
      {
  
              $this-&gt;load-&gt;view('includes/header');
              $this-&gt;load-&gt;view('includes/menu');
              echo "&lt;div class='error'&gt;";
              echo "Somthins Is Missing";
              echo "&lt;/div&gt;";
  
       }  
  </code></pre>
  
  <p>I also want to know I am using <code>redirect(current_url());</code> is it correct or without using it we can generate message from controller to view.</p>