title: Simple html/php form to output on the same page
body: <p>Basically all I want is for users to come into the site, type in their message and name, and the results should be displayed in the same page and when another user comes in again, the results from previous user should be there and anything that comes up should just be added to the list.</p>
  
  <p>currently I have:</p>
  
  <pre><code> &lt;form id="form1" name="form1" method="post" action=""&gt;
   &lt;label&gt;Please type in a message
   &lt;input type="text" name="msg" id="msg" /&gt;
   &lt;/label&gt;
   &lt;label&gt;and your name
   &lt;input type="text" name="pin" id="name" /&gt;
   &lt;/label&gt;
  
   &lt;p&gt;
   &lt;label&gt;Submit
   &lt;input type="submit" name="submit" id="submit" value="Submit" /&gt;
   &lt;/label&gt;
   &lt;/p&gt;
   &lt;/form&gt;
  
  &lt;?php 
  $msg = $_POST[msg];
   $name = $_POST[name];
  
  ?&gt;
   &lt;br /&gt;
   &lt;?php echo "$msg"?&gt;
   &lt;?php echo "$name"?&gt;
  </code></pre>
  
  <p>but when another record is type in, the previous one is lost...</p>
  
  <p>thanks in advance</p>