title: Store date into MySQL database after form submit
body: <p>Here is my code, there are few before but here is the main code.</p>
  
  <p>When i click <strong>Complete Order</strong> my database records <code>amazon_code</code> in db but i am trying to record <code>gift_pin</code> &amp; <code>gift_card_name</code> these two data as well. When pressing <strong>Complete Order</strong> i need these two data added in db directly. please help</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php if (isset($this-&gt;data['amazon'])) { ?&gt;
                               &lt;input type="hidden" id="payment_method" value="amazon" /&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-12"&gt;
                                          &lt;div class="form-group" id="group-amazon_code"&gt;
                                              &lt;label class="col-xs-12  form-control-label"&gt;Gift Card Number:
                                                  &lt;span class="muted small"&gt;(this is the code under the scratch off area)&lt;/span&gt;
                                              &lt;/label&gt;
                                              &lt;div class="col-md-12"&gt;
                                                  &lt;input type="text" autocomplete="yes" value="" class="form-control" name="amazon_code" id="amazon_code" placeholder="Amazon Gift card # (under scratch off)" /&gt;
                                                  &lt;label for="amazon_code" class="error"&gt;Error Text&lt;/label&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                          
                                          
                                          
                                           &lt;div class="form-group" id="group-amazon_code"&gt;
                                              &lt;label class="col-xs-12  form-control-label"&gt;PIN&lt;/label&gt;
                                              &lt;div class="col-md-12"&gt;
                                                  &lt;input type="text" autocomplete="yes" value="" class="form-control" name="gift_pin" id="gift_pin" placeholder="Enter PIN #" /&gt;
                                                  &lt;label for="gift_pin" class="error"&gt;Error Text&lt;/label&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                          
                                          
                                          
                                          &lt;div class="form-group"&gt;
        &lt;label for="human" class="col-sm-4 control-label"&gt;Gift Card Name:&lt;/label&gt;
        &lt;div class="col-sm-8"&gt;
                           &lt;select class="form-control" name="gift_card_name"&gt;
                               &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'PayPal') echo 'selected="selected"'; ?&gt; value="PayPal"&gt;PayPal&lt;/option&gt;
                                  &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'eBay') echo 'selected="selected"'; ?&gt; value="eBay"&gt;eBay&lt;/option&gt;
                                  &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'Google') echo 'selected="selected"'; ?&gt; value="Google"&gt;Google&lt;/option&gt;
                                  &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'iTunes') echo 'selected="selected"'; ?&gt; value="iTunes"&gt;iTunes&lt;/option&gt;
                                  &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'BestBuy') echo 'selected="selected"'; ?&gt; value="BestBuy"&gt;BestBuy&lt;/option&gt;
                              &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'Hotels.com') echo 'selected="selected"'; ?&gt; value="Hotels.com"&gt;Hotels.com&lt;/option&gt;
                              &lt;option &lt;?php if($this-&gt;data['gift_card_name'] == 'Bass Pro') echo 'selected="selected"'; ?&gt; value="Bass Pro"&gt;Bass Pro&lt;/option&gt;
                              &lt;/select&gt;
        &lt;/div&gt;
       &lt;/div&gt;
       
       
                                          
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  
                              &lt;?php } // End of Amazon?&gt;
  
  
                              &lt;div class="row"&gt;
                                  &lt;div class="col-xs-12"&gt;
                                      &lt;div class="alert alert-info"&gt;
                                          &lt;div class="row"&gt;
                                              &lt;div class="col-xs-6"&gt;
                                                  &lt;div class="panel"&gt;
                                                      &lt;div class="panel-body"&gt;
                                                          &lt;h4 class="text-center"&gt;Credits&lt;/h4&gt;
                                                          &lt;h2 class="credits_text credits text-center"&gt;&lt;/h2&gt;
                                                      &lt;/div&gt;
                                                  &lt;/div&gt;
                                              &lt;/div&gt;
                                              &lt;div class="col-xs-6"&gt;
                                                  &lt;div class="panel"&gt;
                                                      &lt;div class="panel-body"&gt;
                                                          &lt;h4 class="text-center"&gt;Order Total&lt;/h4&gt;
                                                          &lt;h2 class="price_text text-success text-center"&gt;&lt;/h2&gt;
                                                      &lt;/div&gt;
                                                  &lt;/div&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
                          &lt;!-- STEP 3 --&gt;
  
  
                      &lt;/div&gt;
                      &lt;div class="clearfix"&gt;&lt;/div&gt;
  
                  &lt;/div&gt;
                  &lt;div class="clearfix"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="clearfix block"&gt;&lt;/div&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-sm-4 col-xs-6"&gt;
                  &lt;a href="#" class="btn btn-block btn-default btn-lg prev-btn"&gt;Previous Step&lt;/a&gt;
              &lt;/div&gt;
              &lt;div class="col-sm-8 col-xs-6"&gt;
                  &lt;a href="#" class=" btn btn-block btn-lg btn-success next-btn"&gt;Next Step&lt;/a&gt;
                  &lt;a href="#hasErrors" class=" btn btn-block btn-lg btn-primary finish-btn" data-submit="&lt;?php echo (isset($this-&gt;data['amazon'])) ? 'amazonprocess' : 'process'; ?&gt;"&gt;
                      &lt;span class="fa fa-shopping-cart" aria-hidden="true"&gt;&lt;/span&gt;
                      Complete Order
                  &lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>