如何使用bootstrap&#34;模态框&#34;代替&#34; <a> tag and new page&#34;?

时间:2017-11-16 11:30:59

标签: php html bootstrap-modal

I can show details data in a new page using details.php using anchor tag like bellow :

<a class="btn btn-info"  href="details.php?view_id=<?php echo $row['studentID']; ?>" title="click for Details" onclick="details.php"><span class="glyphicon glyphicon-eye-open"></span> Show Details</a> 

Now I am trying to learn it to show using bootstrap modal box like code bellow:

<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Details</button> 

I have put the code of "details.php" in #myModel section and how I can show details data using dynamic ID - comes from view_id= for the code I am trying? Please help me to understand my mistake. Thank you.

0 个答案:

没有答案