$sql = "select * from officer where O_namelogin='$O_namelogin' and O_passlogin='$O_passlogin'";
$query = mysql_query($sql) or die("error=$sql");
$num = mysql_num_rows($query);
echo $sql = "select * from officer where O_namelogin='$O_namelogin' and O_passlogin='$O_passlogin'";
$query = mysql_query($sql) or die("error=$sql");
echo $num = mysql_num_rows($query);
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'echo $sql = "select * from officer where O_namelogin='$O_namelogin' and O_passlo' at line 1
$sql = "select * from officer where O_namelogin='$O_namelogin' and O_passlogin='$O_passlogin'";
$query = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($query);