title: if (!empty($_POST)) not working
body: <p>I have a php form (code to follow) with a submit button that runs <code>JSON-events.php</code> as its <code>action</code> (<code>method = POST</code>). In the JSON-events code I am testing whether the form has been submitted using <code>if (!empty($_POST))</code>. My issue is that the JSON-events code doesnt seem to be recognising <code>$_POST</code>.</p>
  
  <p>Heres the form side code section.</p>
  
  <pre><code>&lt;div class="simple_overlay" id="searchform"&gt;
  &lt;form id="myform" class = "cols" action="json-events.php" method="post" &gt;
  
      &lt;h3&gt;Search&lt;/h3&gt;
  
      &lt;p&gt;
        &lt;label&gt;address/postcode *&lt;/label&gt;
        &lt;input type="address" id="searchaddress" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
      &lt;label for="amount"&gt;maximum distance:&lt;/label&gt;
      &lt;input type="text" id="amount" value="5 miles" style=" border:0; color:#43a8c4; font-weight:bold;" /&gt;
      &lt;/p&gt;
  
      &lt;div id="slider-range-min" style="width:130px; margin-left:4px; margin-bottom:20px"&gt;&lt;/div&gt;
  
      &lt;p id="terms"&gt;
        &lt;label&gt;Category 1&lt;/label&gt;
        &lt;input name="cat1" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
      &lt;p id="terms"&gt;
        &lt;label&gt;Category 2&lt;/label&gt;
        &lt;input name="cat2" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 3&lt;/label&gt;
        &lt;input name="cat3" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 4&lt;/label&gt;
        &lt;input name="cat4" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 5&lt;/label&gt;
        &lt;input  name="cat5" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 6&lt;/label&gt;
        &lt;input name="cat6" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 7&lt;/label&gt;
        &lt;input name="cat7" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 8&lt;/label&gt;
        &lt;input  name="cat8" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 9&lt;/label&gt;
        &lt;input name="cat9" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
        &lt;p id="terms"&gt;
        &lt;label&gt;Category 10&lt;/label&gt;
        &lt;input name="cat10" type="checkbox" value="1" checked="checked"/&gt;
      &lt;/p&gt;
      &lt;p&gt;
        &lt;input type="hidden" name="searchlat" id="searchlat"/&gt;
      &lt;/p&gt;
      &lt;p&gt;
        &lt;input type="hidden" name="searchlong" id="searchlong" /&gt;
      &lt;/p&gt;
  
      &lt;input type="submit" name="search" id="search"/&gt;
      &lt;input type="button" value="Check Address" onclick="codeAddressSearch()"/&gt;
      &lt;button type="reset"&gt;Reset&lt;/button&gt;
  
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and here is the top part of the JSON...</p>
  
  <pre><code>if (!empty($_POST)) {
  </code></pre>
  
  <p>any help very much appreciated</p>