mysql_error() not displaying an error in php : <p>I am trying to save error message but its not showing errors </p>

<pre><code>$selectquery=mysql_query("select * from employee where eid='$eid' and name='$name' and  ssn='$ssn'");
if(mysql_num_rows($selectquery)&gt;0)
{
   $state="success";
   $sql="insert into  pfupload(eid1,name,ssn,state) values('$eid','$name','$ssn','$state')";  
   $sqlquery=mysql_query($sql); 
}
else
{
     $state1= mysql_error();
   $sql1="insert into  pfupload(eid1,name,ssn,state) values('$eid','$name','$ssn','$state1')";  
   mysql_query($sql1); 
}
</code></pre>
