title: PHP Codeigniter ; Preventing form resubmit
body: <p>I am creating a search page in my CodeIgniter project.
  On submit, the form calls the controller function, data is fetched via model function and the resulting array is passed to the view </p>
  
  <p>The problem is that when I refresh the result page the form is resubmitting because the $_POST data is still there in the request headers.
  How can I avoid that resubmit confirmation message </p>
  
  <p>Following is the code for my form :</p>
  
  <pre><code>&lt;!--form--&gt; 
  &lt;form id="find" action="&lt;?php echo base_url()?&gt;search/find" method="post"&gt;
      &lt;input type="text" name="search_key" class="tb4" id="search_key" placeholder="Search here"/&gt;
      &lt;input type="button" value="search"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Following is the code for my controller:</p>
  
  <pre><code> /*
       * function for fetching search results
       * @param void
       * @return void
       */
      public function find()
      {   
          $data['search_result']=$this-&gt;search_model-&gt;search($this-&gt;input-&gt;post('search_key'));
          $this-&gt;load-&gt;view('template/header');
          $this-&gt;load-&gt;view('pages/search_result',$data);
          $this-&gt;load-&gt;view('template/footer');
      }
  </code></pre>
  
  <p>Kindly help me with this.I can't use redirect instead of loading the view since I am bound to pass the result array $data to the view.</p>