使用isset在PHP中无法使用搜索功能

I have a page that returns Site Members based on if(isset($_GET['Search_Button'])). The first block of code (is suppose to) return members based on the search name, the second returns members based on the pagination, the third is the default query.

My php for this is as follows:

global $con;
//query for search function
if(isset($_GET['Search_Button'])) {
    $members_search = mysqli_real_escape_string($con, $_GET['member_search_input']); 
    // $members_search = $_GET['member_search_input'];
    $name = explode(" ", $members_search);

    if (count($name) == 3) {
        $ViewQuery = "SELECT * FROM users WHERE (first_name LIKE '$name[0]%' AND last_name LIKE '$name[2]%') ORDER BY last_name asc";
    }
    else if (count($name) == 2) {
        $ViewQuery = "SELECT * FROM users WHERE (first_name LIKE '$name[0]%' AND last_name LIKE '$name[1]%') ORDER BY last_name asc";
    }
    else{
        $ViewQuery = "SELECT * FROM users WHERE (first_name LIKE '$name[0]%' OR last_name LIKE '$name[0]%') ORDER BY last_name asc";
    }
    //Check if results were found
    if (mysqli_num_rows($ViewQuery) == 0) {
        $_SESSION["ErrorMessage"] = "We can't find anyone with that name.";
        Redirect_to("site_members.php");
    }
}
//query for Pagination
elseif(isset($_GET['Page'])) {
    $Page = $_GET["Page"];

        if($Page == 0 || $Page < 1) {
            $ShowPostFrom = 0;
        }else 

        $ShowPostFrom = ($Page * 15) - 15;

        $ViewQuery = "SELECT * FROM users ORDER BY last_name asc LIMIT $ShowPostFrom, 15";

}
//default query
else{

$ViewQuery = "SELECT * FROM users ORDER BY last_name asc LIMIT 15;";
}

The default and pagination queries work fine, however when I make a search, I always get $_SESSION["ErrorMessage"] = "We can't find anyone with that name."; I know this means that nothing is being picked up.

Here is the html form for search:

<div>
    <form action="site_members.php" method="GET" name="members_search">
        <span style="font-size: 14px;">
            <input type="text" style="width: 240px;" placeholder="Member name..." name="member_search_input">
            <input type="submit" name="Search_Button" value="Search">
        </span>
    </form>
</div>

I actually don't see anything returning to the URL. Is there something I should change in my form action?

You need to run the query and pass the result into mysqli_num_rows not the query as a string.