title: how to redirect page in ajax with the data you send to controller
body: <p>i want to redirect another page after success,
  the code is working fine but i cannot get the data i have passed</p>
  
  <p>this is my jquery</p>
  
  <pre><code>     $.ajax({
           type:'GET',
           url:link,
           data:data,
           success:function(response){
               alert(response);
               if(response === 'true'){
                   $('.message').html('No table found for the specified number of guests.');
               }
               else if(response === 'false'){
                   $('.message').html('The Restaurant is full on this date and time.');
               }
               else{
                    window.location.href = link;
               }
           }
       });
   });
  </code></pre>
  
  <p>this is my controller</p>
  
  <pre><code>public function myReservation(){
  
  
          $location= $this-&gt;input-&gt;get('location');
          $guest= $this-&gt;input-&gt;get('guest');
          $date= $this-&gt;input-&gt;get('date');
          $time= $this-&gt;input-&gt;get('time');
          $result =$this-&gt;reservation_model-&gt;getTables($guest);
          $query = $this-&gt;reservation_model-&gt;getReservations($location,$guest,$date,$time);
          if($result){
              echo 'true';
          }
          else if($query){
              echo 'false';
          }else{
          $queryy['getData'] = $this-&gt;input-&gt;get();
          $this-&gt;load-&gt;view('my_reservation',$queryy);
          }
      }
  </code></pre>
  
  <p>there are no errors displaying just going to redirect page without get data</p>