PHP Blank Values Inserted In Database
<p>I'm using PHP and Mysql</p>

<p>Here I have used simple form to insert the Name, Email, Phone Number.</p>

<p>I have validated all the data's: (PHP code after submit...)</p>

<pre><code>$error = array(); 

if(isset($_POST['Name']) &amp;&amp; $_POST['Name']=='') {
    $error[] = "Please enter the Name";
}

if(isset($_POST['Email']) &amp;&amp; $_POST['Email']=='') {
    $error[] = "Please enter the Email";
}

if(isset($_POST['Phone']) &amp;&amp; $_POST['Phone']=='') {
    $error[] = "Please enter the Phone";
}
</code></pre>

<p>Finally Insert the data using the below query..</p>

<pre><code>if(count($error)==0) {
  $error= "";   
  And the query is
  insert into mytab ('Name','Email','Phone') Values (mysql_escape_string($_POST['Name']),mysql_escape_string($_POST['Email']),mysql_escape_string($_POST['Phone']));
  redircet to success.. 
} 
</code></pre>

<p>It's Works fine, But Some time i am geting Insert $error log like the below..</p>

<p>error Log : </p>

<pre><code> Time File name:myfile.php Insert $error: insert into mytab ('Name','Email','Phone') Values('','','');#~#
</code></pre>

<p>The log i was write using my db wrapper class (using mysql_$error())</p>
