Solution 1 :

Fix your html as:

<?php
    while ($course = mysqli_fetch_assoc($records)){?>
        <tr>
            <td><?php echo $course['user_id']?></td>           
            <td><?php echo $course['first_name']?></td>
            <td><?php echo $course['last_name']?></td>
            <td><?php echo $course['email']?></td>
            <td>
                <select>
                    <option value="Approved">Approved</option>
                    <option value="Dissaproved">Dissaproved</option>
                </select>
            </td>
        </tr>
<?php
    }?>

Problem :

I have an HTML table that gets information fetched from a DB. Using a while loop, all the rows are created depending on the number of user records on the DB. The problem is that only the last row of the table shows the select box.

<table id="UserTable">
    <tr bgcolor="#2ECCFA">
        <th>UserID</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Email</th>
        <th>Approval</th>
    </tr>

    <?php
    while ($course = mysqli_fetch_assoc($records)){
        echo "<tr>";
        echo "<td>".$course['user_id']."</td>";
        echo "<td>".$course['first_name']."</td>";
        echo "<td>".$course['last_name']."</td>";
        echo "<td>".$course['email']."</td>";
    }
    ?>
    <td>
    <select>
        <option value="Approved">Approved</option>
        <option value="Dissaproved">Dissaproved</option>
    </select>
    </td>
</table>

By