title: Checking if form has been submitted - PHP
body: <p>What is the best way of checking whether or not a form has been submitted to determine whether I should pass the form's variables to my validation class?</p>
  
  <p>First I thought maybe:</p>
  
  <pre><code>isset($_POST)
  </code></pre>
  
  <p>But that will always return true as a superglobal is defined everywhere. I don't want to have to iterate through each element of my form with:</p>
  
  <pre><code>if(isset($_POST['element1']) || isset($_POST['element2']) || isset(...etc
  </code></pre>
  
  <p>Whilst writing this question I thought of a much more basic solution, add a hidden field to act as a flag that I can check.</p>
  
  <p><strong>Is there a 'cleaner' way to do it than adding my own flag?</strong></p>