title: Controller Script not Able to Get AJAX Data
body: <p>I am trying to pass serialized form data to a PHP controller with jQuery.  On successful processing, the user will be redirected to a results page.  I am not seeing any redirect taking place which tells me something is wrong with my controller.  I am seeing a sucessful AJAX callback.  </p>
  
  <p>The parameters are 'zipcode' and 'token'. The controller will validate the token, die if invalid, or perform the necessary logic once if valid.</p>
  
  <p>I cannot find anything that stands out as incorrect about my code and could use an extra set of eyes.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action="" class="zipsearchform"&gt;
        &lt;div class="form-group"&gt;
           &lt;h2&gt;Search by Zip Code&lt;/h2&gt;
           &lt;label for="zip-search-field"&gt;Enter a Zip Code&lt;/label&gt;
           &lt;input type="text" class="form-control" id="zip-search-field" name="zipcode"&gt;
           &lt;br&gt;
           &lt;input type="hidden" name="token" value="&lt;?php if (isset($token)) echo $token; ?&gt;"&gt;
           &lt;button type="submit" class="btn btn-default zipsubmitbtn"&gt;Find Notaries&lt;/button&gt;
        &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>$('.zipsubmitbtn').on('click', function(){
      event.preventDefault();
      var params = $('form.zipsearchform').serialize();
      $.ajax({
          type: 'post',
          url: 'parseByZip.php',
          data: {paramString: params},
          async: true,
          success: function(){
              alert(params);
          }
      });
  });
  </code></pre>
  
  <p>PHP Controller</p>
  
  <pre><code>&lt;?php
  include_once 'resources/functions.php';
  $zipcode = $_POST['zipcode'];
  $token   = $_POST['token'];
  
  if (validate_token($token) &amp;&amp; isset($zipcode)) {
      $pattern = '/^\d{5}([\-]?\d{4})?$/';
      if (preg_match($pattern, $zipcode)) {
          $radius = 25;
          include_once 'resources/apizip.php';
          header("Location: notaries.php?lat=$latitude&amp;lon=$longitude&amp;distance=$radius");
      } else {
          echo "Zip code field cannot be empty and zip code must have the proper format of 00000 or 00000-0000";
      }
  } else {
      echo 'Unable to handle your request right now.';
  }
  </code></pre>