title: How to display flashdata in codeigniter
body: <p>Following is my view I am catching the data from the model and displaying on the view using 
  flashdata in codeigniter</p>
  
  <p>My Controller cart.php</p>
  
  <pre><code> public function coupon(){
      for ($i = 0; $i &lt;= $this-&gt;input-&gt;post("products_in_cart"); $i++) {
  
          if (!empty($this-&gt;input-&gt;post("coupn-" . $i))) {
  
              $couponname = $this-&gt;input-&gt;post("coupn-" . $i);
              $products_id = $this-&gt;input-&gt;post("product_id" . $i);
  
              $data = $this-&gt;home_model-&gt;getCoupon($couponname, $products_id);
              $data1 = 'hello';
              $info = array(
                  "PromotioanlName" =&gt; $data-&gt;PromotionalName,
              );
          } else {
  
              $info = 'Thers in no value&lt;br&gt;';
          }
  
  
  
      }
      echo $this-&gt;session-&gt;set_flashdata('message', $info);
      redirect(site_url('cart'));
  }
  </code></pre>
  
  <p>My view cart.php</p>
  
  <pre><code> $message = $this-&gt;session-&gt;flashdata('message');
    print_r($message);
  </code></pre>
  
  <p>But my problem is that my data is overwritten by the next value</p>