title: Two Buttons with different action on same php page
body: <p>I have a PHP page with two Buttons named as Save and Submit.One for Saving form Data and other for submiting the final data.</p>
  
  <pre><code>&lt;button id="save" name="save" onclick="saveForm();"&gt;Save&lt;/button&gt;
  
  &lt;button id="submit" name="submit" onclick="validate();"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p>here are the two JavaScript functions:</p>
  
  <pre><code>function saveForm() {
      document.submission.method = "POST";
      document.submission.action = "SubmissionCheck.php";
      document.submission.submit();
  }
  
  function validate() {
      // some validation code here
      // after validation the rest will work
      document.submission.method = "POST";
      document.submission.action = "SubmissionCheck.php";
      document.submission.submit();
  }
  </code></pre>
  
  <p>In 'SubmissionCheck.php' page I have defined two separate actions for save and submit button, but I am facing the same process of submit button when I click the save button. How do I solve this? Any one help please. Thank you in advance.</p>