How to Refresh DIV content

How to Refresh DIV content

Hi,

I am using below code to popupate data from MySQL into a DIV and I have btnAddToBasket to dynamicly add items to basket OnClick.

After adding, I want to refresh the content of the DIV below using jquery to recall the latest basket items. How can I do this please?

Thanks,
Jassim Rahma

  1. <div id="divBasket" style="background-color: #FFFFFF; margin-top: 50px; margin-right: 120px; border: 1px solid; border-radius: 25px; padding: 10px; width: 300px; float: right;">
  2. <table width="100%" cellspacing="10">
  3. <?php
  4. $session_id = $_SESSION["id"];
  5.     $mysql_query = $mysql_connection->prepare('CALL sp_populate_basket_items(:param_session_id)');
  6. $mysql_query->bindParam(':param_session_id', $session_id, PDO::PARAM_STR);
  7.     $mysql_query->execute();

  8.     while($mysql_row = $mysql_query->fetch())
  9.     {
  10. ?>
  11. <tr>
  12. <td class="item_name"><?php echo $mysql_row["item_name"]; ?></td>
  13.     <td class="item_quantity"><?php echo $mysql_row["item_quantity"]; ?></td>
  14.     <td class="item_price"><?php echo $mysql_row["item_price"]; ?></td>
  15. </tr>
  16. <?php } ?>
  17. <tr>
  18. <td align="center" colspan="3"><img src="images/buy_now.png"></td>
  19. </tr>
  20. </table>
  21. </div>