title: My PHP form isn't returning anything from $_POST
body: <p>I have a relatively simple PHP form. When I'm using <code>print_r($_POST);</code> I'm not receiving anything back. Just this result: </p>
  
  <pre><code>`Array
    (
    )
    1`
  </code></pre>
  
  <p>My form is pretty simple: </p>
  
  <pre><code>&lt;form action="" method="post" enctype="multipart/form-data" class="zip-&lt;?php echo $atts['class']; ?&gt;"&gt;
          &lt;div class="row "&gt;
              &lt;div class="&lt;?php echo $column1; ?&gt;" &lt;?php echo $inlineStyle ?&gt;&gt;
                  &lt;div class="lds-facebook hide"&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;div&gt;&lt;/div&gt;&lt;/div&gt;
                  &lt;input type="text" name="zip" class="zip"&gt;
              &lt;/div&gt;
              &lt;div class="&lt;?php echo $column2 ?&gt;"&gt;
                  &lt;button type="submit" class="submit" name="submit"&gt;
                    &lt;?php echo $buttonValue; ?&gt;
                    &lt;i class='fa fa-caret-right' aria-hidden='true'&gt;&lt;/i&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>The goal of the form is to simply post and then redirect to a page depending on the value received from the input. Any thoughts? </p>
  
  <pre><code>public static function find_zip_widget( $atts, $content = null ) { 
      ini_set('display_errors', '1');
  
      extract(shortcode_atts(array(
      'class' =&gt; 'class'
  ), $atts));
  
      // Set classes for rows
      if($atts['class'] == 'home'){
          $column1 = 'col-md-6 col-12 my-auto text-center border-underline';
          $column2 = 'col-md-6 col-12';
          $buttonValue = 'FIND HELP RIGHT NOW';
          $inlineStyle = '';
      }
  
      if($atts['class'] == 'widget'){
          $column1 = 'col-md-5 col-5 offset-2 offset-md-0 my-auto';
          $column2 = 'col-md-7 col-5 my-auto';
          $buttonValue = 'SUBMIT';
          $inlineStyle = 'style="border-bottom: 3px solid #9EA2A4 !important;min-height: 30px;"';
      }
  
      ?&gt;
      &lt;form action="" method="post" enctype="multipart/form-data" class="zip-&lt;?php echo $atts['class']; ?&gt;"&gt;
          &lt;div class="row "&gt;
              &lt;div class="&lt;?php echo $column1; ?&gt;" &lt;?php echo $inlineStyle ?&gt;&gt;
                  &lt;div class="lds-facebook hide"&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;div&gt;&lt;/div&gt;&lt;/div&gt;
                  &lt;input type="text" name="zip" class="zip"&gt;
              &lt;/div&gt;
              &lt;div class="&lt;?php echo $column2 ?&gt;"&gt;
                  &lt;button type="submit" class="submit" name="submit"&gt;
                    &lt;?php echo $buttonValue; ?&gt;
                    &lt;i class='fa fa-caret-right' aria-hidden='true'&gt;&lt;/i&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  
      &lt;?php    
          echo "&lt;pre&gt;";
          echo "Before if: ";
          echo  print_r($_POST); 
          echo "&lt;/pre&gt;";
      ?&gt;
  
      &lt;?php 
          $states = get_categories( array(
          'orderby' =&gt; 'name',
          'order'   =&gt; 'ASC',
          'hide_empty' =&gt; false,
          'taxonomy' =&gt; 'endeavors_location_state'
          ) );
  
  
          if (isset($_POST['submit'])) {
              $postalZip = $_POST["zip"];
  
              echo "&lt;pre&gt;";
              echo "After if: ";
              echo  print_r($_POST);
              echo "&lt;/pre&gt;";
  
              echo '&lt;br&gt; &lt;br&gt; PostalZip: ' . $postalZip;
  
              ///REDIRECT FOR CITY, STATE, or other/////
              $ch = curl_init(); 
              curl_setopt($ch, CURLOPT_URL, "https://maps.googleapis.com/maps/api/geocode/json?address='.$postalZip.'&amp;key=AIzaSyBX_0qZmGBtiHrZMcjZfv6yL7NAbLiwnjc");
              // curl_setopt($ch, CURLOPT_URL, "https://maps.googleapis.com/maps/api/geocode/json?address=78210&amp;key=AIzaSyBX_0qZmGBtiHrZMcjZfv6yL7NAbLiwnjc");
              curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
              $output = curl_exec($ch);
  
              curl_close($ch);
              $jsonResults = json_decode($output, true);
  
  
  
              $cityName = $jsonResults['results'][0]['address_components'][1]['long_name'];
              $stateName = $jsonResults['results'][0]['address_components'][3]['long_name'];
  
  
              $cityName = strtolower(str_replace(" ","-",$cityName));
              $stateName = strtolower(str_replace(" ","-",$stateName));
  
              $args = array(
                  'post_type' =&gt; 'endeavors_locations',
                  'post_status' =&gt; 'publish',
                'numberposts' =&gt; -1
              );
  
              $cityFound = 0;
              $allCityLocations = get_posts( $args );
              foreach ($allCityLocations as $location) {
                  $eachCity = strtolower(str_replace(" ","-",$location-&gt;post_name));
                  echo $eachCity;
  
                  if ($location-&gt;post_name === $cityName) {
                      $cityFound = 1;
                      echo $cityFound;
                  }
              }
  
              if ($cityFound === 1) {
                  wp_safe_redirect('/locations/'.$cityName);
                  } else {
                  foreach ($states as $state) {
                      if ($state-&gt;slug === $stateName) {
                           $stateFound = 1;
                      }
                  }
                  if ($stateFound === 1) {
                  wp_safe_redirect('/state/'.$stateName);
                  } else {
                      wp_safe_redirect('/all-locations/');
                  }
              }
          }
      ///END OF REDIRECT FOR CITY, STATE, or other/////
      } //end function
  </code></pre>