I am getting this warning:
Warning: mysql_num_rows() expects parameter 1 to be resource
On this script:
if (isset($_POST['submit'])){
change_db($realm_DB);
$loginusername = "$acc_name";
$loginpass = $_POST['password'];
$sha_pass_hash = sha1(strtoupper($loginusername) . ":" . strtoupper($loginpass));
$qry=mysql_query("UPDATE `$realm_DB`.`account` SET `sha_pass_hash`='$sha_pass_hash', `v`='', `s`='', WHERE (`username`='$loginusername');");
if (mysql_num_rows($qry) == 1){
?>
< script type="text/javascript" >
{
alert("Successfully changed password!");
}
< /script>
< ?php
}
}
?>
My code otherwise works but is the warning somehow hideable? It appears right in middle of my website -_-