title: PHP Re-adds value to MYSQL on page refresh
body: <p>im fairly new to php, but i know my way around, and ive done lots of research on this problem, but still cannot find the right solution to this. Here's my php code:</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
      &lt;body&gt;
      &lt;form action="default.php" method="POST"&gt;
      &lt;input type="text" name="hname"&gt;
      &lt;input type="submit" name="submit" value="Submit"&gt;
      &lt;/form&gt;
      &lt;?php
      require("connect.php");
      $con = mysql_connect("mysql10.000webhost.com","$username","$password");
      $pname=$_POST[hname];
      mysql_query("INSERT INTO web_members(name) VALUES('$pname')");
      $result = mysql_query("SELECT * FROM web_members");
      while($row = mysql_fetch_array($result))
      {
      echo $row['name'];
      echo "&lt;br /&gt;";
      }
  
      ?&gt;
  </code></pre>
  
  <p>And basically it adds and displays the variable fine, but whenever i refresh the page it repeats the process. Can anyone help with this?</p>