I'm getting an error on the <?php endwhile; ?> line.
Error:
Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE);
Code:
$result = mysqli_query($connect,"SELECT* FROM contacts");
    ?>
    <table width="800" cellpadding="10" cellspacing="5" border="2">
        <tr>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Contact No</th>
            <th>Email</th>
        </tr>
    <?php while ($row = mysqli_fetch_array($result)); ?>
        <tr>
            <td><?php echo $row['first_name']; ?></td>
            <td><?php echo $row['last_name']; ?></td>
            <td><?php echo $row['contact_no']; ?></td>
            <td><?php echo $row['email']; ?></td>
        </tr>
    <?php endwhile; ?>
    </table>
No record is showing in the table. The page is just showing the error.
 
     
    