Jump to content

Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result...on line 28


Recommended Posts

<!DOCTYPE html>
    <title>Registered Users</title>
    <link rel="stylesheet" href="includes/style.css" type="text/css" media="screen"/>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css">
        <table id="records">
                    <th>First Name</th>
                    <th>Last Name</th>
                    $query = "SELECT * FROM users";
                    $result = mysqli_query($dbc,$query);
                    if(mysqli_num_rows($result) > 0) -------------------------------------------------Line 28

                        while($row = mysqli_fetch_assoc($result))
                                <td><?php echo $row["id"];?></td>
                                <td><?php echo $row["First Name"];?></td>
                                <td><?php echo $row["Last Name"];?></td>
                                <td><?php echo $row["Email"];?></td>
<?php include('includes/footer.html');?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.