title: How to insert data using modal sweet alert ajax with codeigniter
body: <p>i have trouble to insert data using modal sweet alert, this is my script :</p>
  
  <pre>
  
      function gettour(){
                      swal.setDefaults({
                        input: 'text',
                        confirmButtonText: 'Next',
                        showCancelButton: true,
                        animation: false,
                        progressSteps: ['1', '2']
                      })
  
                      var steps = [
                        {
                          input: 'number',
                          title: 'Question 1',
                          text: 'Berapa quantity yang di pesan'                   
                        },
                        {
                          input: 'text',
                          title: 'Question 2',
                          text: 'Tanggal Keberangkatan'
                        },
  
                      ]
  
                      swal.queue(steps).then(function (result) {
                        swal.resetDefaults()
                        swal({
  
                        })
                      }, function () {
                        swal.resetDefaults()
  
                          var qty = result[0];
                          var tglgo = result[1];
                          var dataString = 'qty='+qty+'tglgo='+tglgo;
  
                          $.ajax({
                              type:'POST',
                              data:dataString,
                              url:'travel.yes/garden/request',
                              success:function(data) {
                                  alert(data);
                              }   
                          });
  
                      })
  
                  };
  
  </pre>
  
  <p>And this is my Controller</p>
  
  <pre>
  
      public function request()
          {
              $qty = $this->input->post('qty');
              $tglgo = $this->input->post('tglgo');
              $results = $this->model_crud_admin->request_tour($qty,$tglgo);
  
              if($results){
                  redirect('garden/member_area?auth=tour','refresh');
              }
          }
  
  </pre>
  
  <p><strong>Thank you :)</strong></p>