title: How to check if a form is submitted via javascript?
body: <p>I have this conventional submit button which submit a form like this:</p>
  
  <pre><code>&lt;form method="post" id="form_submit"&gt;
  ...
  &lt;input class="button" type="submit" name="Submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And I check if the submit button is clicked using this:</p>
  
  <pre><code>if(isset($_POST['Submit'])){
     //update DB
  }
  </code></pre>
  
  <p>Now I have a submit link using jquery:</p>
  
  <pre><code>&lt;a href="#" onclick="publish(); return false;"&gt;Submit&lt;/a&gt;
  </code></pre>
  
  <p>JS code:</p>
  
  <pre><code>$("#form_submit").submit();
  </code></pre>
  
  <p>What is the alternative way here to be used here for <code>if(isset($_POST['Submit']))</code> since I'm submitting the form using javascript? </p>