title: Inserting multple rows into table from a submit form
body: <p>Please I want to know the possibility of successfully executing the below code...
  Please if its possible to implement, can someone help me and put me through where I'm getting it wrong.</p>
  
  <p>...think I'm a green horn here </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!---HTML file---&gt;
  &lt;form name='myform' action='test.php' method='post'&gt;
  &lt;input type='text' name='fname' value='John' /&gt;
  &lt;input type='text' name='phone' value='+254 ********' /&gt;
  
  &lt;input type='text' name='fname' value='Jane' /&gt;
  &lt;input type='text' name='phone' value='+254 ********' /&gt;
  
  &lt;input type='text' name='fname' value='Chris' /&gt;
  &lt;input type='text' name='phone' value='+254 *********' /&gt;
  
  &lt;input type='text' name='fname' value='Solo' /&gt;
  &lt;input type='text' name='phone' value='+254 *********' /&gt;
  
  
  &lt;input type='submit'  value='I wish to insert all the four sets of records at once' /&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>$fname = trim(mysql_real_escape_string($_POST["fname"]));
  
  $phone = trim(mysql_real_escape_string($_POST["phone"]));
  
  $results = mysql_query("INSERT INTO mytable (id, fname, phone)
  
  VALUES 
   ('', '$fname', '$phone'),
   ('', '$fname', '$phone'),
   ('', '$fname', '$phone'),
   ('', '$fname', '$phone')");
  </code></pre>