title: Using PHP Curl to submit form and get results
body: <p>The form on the website is...</p>
  
  <pre><code>&lt;form action="" method="POST"&gt;
  &lt;input style="width:30%;background-color:#e2e2e2;border:#000;color:#000;" type="text" name="userName" placeholder="Enter a username" required=""&gt;
  &lt;br&gt;
  &lt;input type="submit" name="userBtn" value="get Username"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Once you fill out a value in <code>name="userName"</code> and click <code>name="userBtn"</code> the page refreshes and changes the value of <code>name="userName"</code> to the information that I want.</p>
  
  <p>How would I go about submitting a form and then retrieving the data that it writes?</p>