# PHP Ajax Insert Data in MySQL By Using Bootstrap Modal

**URL:** <https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905>\
**Category:** Javascript & Ajax\
**Created:** [December 7, 2023, 8:59pm UTC](https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905 "2023-12-07T20:59:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uksherminator](https://www.phphelp.com/letter_avatar_proxy/v4/letter/u/bc79bd/32.png) [@uksherminator](https://www.phphelp.com/u/uksherminator)\
**Post date:** [December 7, 2023, 8:59pm UTC](https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905/1 "2023-12-07T20:59:43Z")

</div>

Hi there, I am using this [code](https://www.webslesson.info/2016/10/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal.html) to refresh a table containing radio boxes that are used to select a delivery address on a form. If the user needs to add a new delivery address, the entire form input boxes remain populated and the delivery address table is refreshed for the user to select the new address. This is all working fine.

My problem is that when I use the modal to add a new delivery address and the DIV is refreshed, I cant seem to POST the refreshed DIV radio value.

---

<div class="post-metadata">

**Author:** ![phdr](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@phdr](https://www.phphelp.com/u/phdr)\
**Post date:** [December 7, 2023, 11:10pm UTC](https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905/2 "2023-12-07T23:10:29Z")

</div>

Do other form fields and selecting an existing delivery address work?

The tutorial isn’t even using a form for the displayed information. Best guess is that the markup that is being produced and output by the insert.php code isn’t valid.

You would need to post all your code, less any database connection credentials, for anyone to be able to help.
