dos3018 2016-10-15 22:55
浏览 36

Bootstrap MYSQL PHP - 发送模态内容

I have data I'm displaying in a table, using bootstrap. For each of those I'm wanting to do a modal, on this you would confirm you want to send an email.

This is the link they would click:

<a data-toggle="modal" data-target="#email-'.$row['id'].'">Resend Email</a>

The modal is on another page, and I've included this within the while for the MYSQL data using:

include 'modal/modal-resend-email.php';

On this page I then load the modal using:

<div id="email-<?php echo $row['id'];?>" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      <div class="modal-body">
        <p><?php echo $row['number_tenants']; echo $row['full_name_one'];?></p>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>


For each of the buttons that load you can click them and it will open a modal, the problem is it only ever shows data from the very first row, am I doing something wrong, or is there a better way to do this?


  • 写回答

1条回答 默认 最新


      相关推荐 更多相似问题


      • ¥15 如何关闭soui dummy wdn 进程
      • ¥20 含有jar文件的文件夹用tar -zcvf 命令压缩后要怎么还原回去?
      • ¥15 天宝TBC软件出现报错怎么解决
      • ¥15 micropython 从1开始切片报错
      • ¥15 请问该怎么做才能将文字说明和二维码一起作为png图片一起下载
      • ¥15 r语言 混频数据回归 midas_r
      • ¥15 人脸识recogizer.predict返回值id报错,KeyError,详情如下
      • ¥15 geowebcache部署失败
      • ¥20 关于adaboost+haar特征实现人脸检测过程的一些细节问题
      • ¥15 csv文件增加一列 为csv文件的名字