title: PHP Redirect to new page after form submission
body: <p>I have a form, which redirects the user to "page1.php" after the form is submitted. What I want to do is to redirect the user to "page2.php" after the form is submitted, but I need to make sure that the POST request was sent. Example:</p>
  
  <pre><code>&lt;form action="page1.php" method="POST"&gt;
  &lt;input type="text" name="username" /&gt;
  &lt;input type="text" name="age" /&gt;
  &lt;input type="submit" value="" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When the user clicks on Submit, it redirects him to page1.php. I want to redirect him to page2.php, but I need to make sure that the data is sent to the server. I can't use AJAX. Is there any way to do it with cURL or something like that? Any examples?</p>
  
  <p>Thanks!</p>