The reason you get an error is that you haven't fetched the data from the mysql_query..
another thing i want to comment on this script is the potential hazard of not encrypting your passwords.. in mysql there's a function called password() that encrypts your passwords..
and you might also take in considering the chanse of users having the same passwords.
the query you'r using is getting rows based on the password, so i urge you to consider inputing the username into the query to..
example:
$result = mysql_query("SELECT * FROM member WHERE username = '$username' AND WHERE password = password('$old_pass')");
if(!$result) {
echo("Something went wrong:".mysql_error());
} else {
if (mysql_num_rows($result) == 1) {
put udatequery here..
} else {
echo("Wrong old password");
}
}