title: Inserting duplicate data code in codeigniter
body: <p>I trying to insert data in database but every time my script run its insert duplicate data in data which is already exists - My code its in codeigniter..</p>
  
  <pre><code>$data = array(
                 'user_id' =&gt; $user_id,
                 'webid' =&gt; $webid,
                 'webname' =&gt; $webname,
                 'order_id' =&gt; $order_id,
                 'buyer_name' =&gt; $first_name,
                 'product_name' =&gt; $item_name,
                 'purchase_date' =&gt; $purchase_date,
                 'order_status' =&gt; $order_status,
                 'shipping_name' =&gt; $first_name,
                 'shipping_email' =&gt; $email,
                 'shipping_street1' =&gt; $company,
                 'shipping_street2' =&gt; $street_1,
                 'shipping_street3' =&gt; $street_2,
                 'shipping_cityname' =&gt; $city,
                 'shipping_state' =&gt; $state,
                 'shipping_phone' =&gt; $phone,
                 'shipping_postalcode' =&gt; $zip,
                 'country' =&gt; $country,
                 'print_status' =&gt; $print_status
  
              );
  
  
  $this-&gt;db-&gt;insert('orders', $data); 
  </code></pre>
  
  <p>Any Ideas will be greate!</p>