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
- <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;">
- <table width="100%" cellspacing="10">
- <?php
- $session_id = $_SESSION["id"];
- $mysql_query = $mysql_connection->prepare('CALL sp_populate_basket_items(:param_session_id)');
- $mysql_query->bindParam(':param_session_id', $session_id, PDO::PARAM_STR);
- $mysql_query->execute();
-
- while($mysql_row = $mysql_query->fetch())
- {
- ?>
- <tr>
- <td class="item_name"><?php echo $mysql_row["item_name"]; ?></td>
- <td class="item_quantity"><?php echo $mysql_row["item_quantity"]; ?></td>
- <td class="item_price"><?php echo $mysql_row["item_price"]; ?></td>
- </tr>
- <?php } ?>
- <tr>
- <td align="center" colspan="3"><img src="images/buy_now.png"></td>
- </tr>
- </table>
- </div>