Q:

mysqli_num_rows error, "expects parameter 1 to be resource"

the following script returns an error:
Warning: mysql_num_rows() expects parameter 1 to be resource
I cant figure out where is the problem, 
I've test the mysql connection and they seems fine,
I think the problem might be the $result, but I can't find our the error in the line. 
I echo the $reuslt and it retures
Catchable fatal error: Object of class mysqli_result could not be converted to string

$link = mysqli_connect("127.0.0.1", "root", "")or die("cannot connect"); 
mysqli_select_db($link,"database")or die("cannot select DB");

    $name=$_POST['nameNews'];
    $email=$_POST['emailNews'];
    $name= mysqli_real_escape_string($link,$name);
    $email= mysqli_real_escape_string($link,$email);

if(isset($_POST['nameNews']) && isset($_POST['emailNews'])){

    $result=mysqli_query($link, "SELECT*FROM news WHERE email = '$email'");
    $numRows=mysqli_num_rows($result);

            if ($numRows==1)
            {echo"You have registered already.";}   
            else if ($numRows==0)
            {
            mysqli_query($link,"INSERT INTO news VALUES ($name,$email)");
            echo"Thankyou.";
            }
}

A:

$result=mysqli_query("SELECT*FROM news WHERE email = '".$email."'");
$numRows=mysqli_num_rows($result);

check this

