title: HTML/PHP same page script
body: <p>Hey, I'm making a script that checks if a specified string matches the one in check.php. Here is my HTML code:</p>
  
  <pre><code>&lt;form name="input" action="check.php" method="POST" id="key"&gt;
      Key: &lt;input type="text" name="key" /&gt;
      &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>However, when it runs check.php it goes to the default white page. Is there a way to get the result to display on the page where they typed the information on, like at the top or bottom? Here is my check.php (just for testing atm):</p>
  
  <pre><code>&lt;?php
      $key=$_POST['key'];
      echo $key;
  ?&gt;
  </code></pre>