Warning: mysqli_num_rows() expects exactly 1 parameter, 2 .... on line 14
<p>I've got error from topic in the script below:</p>

<pre><code>&lt;?php
include("db.php");
if($_SERVER["REQUEST_METHOD"] == "POST") {
    $email = mysqli_real_escape_string($link,$_POST['email']);
    $password = mysqli_real_escape_string($link,$_POST['password']);
    $gender = $_POST['gender'];
    $password = md5($password); 
    if ($gender == female) {
        $sql="SELECT id FROM female_users WHERE email='$email' AND password='$password'";
    } else {
        $sql="SELECT id FROM male_users WHERE email='$email' AND password='$password'";
    }
    $result=mysqli_query($link,$sql);
    $count=mysqli_num_rows($link,$result);

    if($count==1) {
        echo('Hello');
    } else  {
        $error="Your Email or Password is invalid";
    }
}
mysqli_close($link);
?&gt;
</code></pre>

<p>I'm not sure what it is about..  i've tried to eliminate if statement, but it gave me no results.</p>