如果,我告诉你了.
带模态触发按钮 $row['ID']
$order .= 'Edit ';
$row['ID']
使用Ajax方法获取值的Bootstrap Modal事件
$(document).ready(function(){ $('#myModal').on('show.bs.modal', function (e) { var rowid = $(e.relatedTarget).data('id'); $.ajax({ type : 'post', url : 'fetch_record.php', //Here you will fetch records data : 'rowid='+ rowid, //Pass $id success : function(data){ $('.fetched-data').html(data);//Show fetched data from database } }); }); });
模态HTML
Edit Data
//Here Will show the Data
上次创建fetch_record.php
,检索记录并以模态显示
把它放在你的循环中
Modal Header
Some text in the modal.