Jump to content

mikkiharu

New Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by mikkiharu

  1. <!DOCTYPE html>
    <html>
    <head>
        <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">
    </head>
    <body>
        <?php
        include('includes/header.html');
        ?>
        <center>
            <table id="records">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Email</th>
                    </tr>>
                </thead>
                <tbody>
                    <?php
                        require_once('mysqli_connect.php');
                        $query = "SELECT * FROM users";
                        $result = mysqli_query($dbc,$query);
                        
                        if(mysqli_num_rows($result) > 0) -------------------------------------------------Line 28

                        {
                            while($row = mysqli_fetch_assoc($result))
                            {?>
                                <tr>
                                    <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>
                                </tr>
                                <?php
                            }
                        }
                        mysqli_close($dbc);
                    ?>
                </tbody>
            </table>
        </center>
    </body>
    <?php include('includes/footer.html');?>
    </html>

×
×
  • 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.