title: An empty row gets inserted into the database in spite of the posted data through a form
body: <p>I made a simple HTML form with [post] method, and with an external action php page. The problem I face is that every time I press the submit button, an empty row gets inserted in database instead of my input data.</p>
  
  <p>This is my index page : </p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Webediah Add new hosting customer&lt;/title&gt;
  &lt;style type="text/css"&gt;
  .auto-style1 {
      text-align: left;
  }
  .auto-style2 {
      text-align: center;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;form id="form1" name="form1" method="post" action="add.php"&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;h1 class="auto-style2"&gt;&lt;strong&gt;New Hosting Customer &lt;/strong&gt;&lt;/h1&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;table width="43%" border="0" align="center"&gt;
      &lt;tr&gt;
        &lt;td width="36%" scope="row" class="auto-style1"&gt;Customer name :&lt;/td&gt;
        &lt;td width="64%"&gt;&lt;label for="cname"&gt;&lt;/label&gt;
        &lt;input type="text" name="cname" id="cname" style="width: 233px" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td scope="row" class="auto-style1"&gt;Customer Domain :&lt;/td&gt;
        &lt;td&gt;&lt;label for="cdomain"&gt;&lt;/label&gt;
        &lt;input type="text" name="cdomain" id="cdomain" style="width: 234px" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td scope="row" class="auto-style1"&gt;Host start on :&lt;/td&gt;
        &lt;td&gt;&lt;label for="hstart"&gt;&lt;/label&gt;
        &lt;input type="text" name="sdate" id="hstart" style="width: 236px" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td scope="row" class="auto-style1"&gt;Host ends on :&lt;/td&gt;
        &lt;td&gt;&lt;label for="hends"&gt;&lt;/label&gt;
        &lt;input type="text" name="edate" id="hends" style="width: 236px" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td scope="row" class="auto-style1"&gt;Customer Email :&lt;/td&gt;
        &lt;td&gt;&lt;label for="cemail"&gt;&lt;/label&gt;
        &lt;input type="text" name="cemail" id="cemail" style="width: 237px" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th scope="row"&gt;&amp;nbsp;&lt;/th&gt;
        &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th scope="row"&gt;&lt;input type="submit" name="Submit" id="Submit" value="Submit" /&gt;&lt;/th&gt;
        &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;/form&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is my external action php page:</p>
  
  <pre><code>&lt;?php $con = mysqli_connect("localhost","root","111","awamah");
  
  
  if (mysqli_connect_errno())
  echo " error in mysql connection" . mysqli_connect_errno(); 
  
  
  $sql = "INSERT INTO `customer` (`cname`,`cdomain`,`sdate`,`edate`,`cemail`) VALUES ('$_post[cname]','$_post[cdomain]','$_post[sdate]','$_post[edate]','$_post[cemail]')";
  
  if(!mysqli_query($con,$sql))
  {
      die('Error: ' . mysqli_error($con));
  }
  echo "1 record added";
  
  ?&gt;
  </code></pre>