How to end a while loop when used in a fetch assoc function [closed]

in while($row = $result->fetch_assoc()); semicolon occored issue. replace ; with :

<?php while($row = $result->fetch_assoc()): ?>
       <tr>
          <td><?php echo $row['name']; ?></td>
           <td><?php echo $row['location']; ?></td>
           <td></td>
        </tr>
 <?php endwhile; ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)