Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP While循环中的纯CSS模式(非引导)_Php_Jquery_Ajax - Fatal编程技术网

PHP While循环中的纯CSS模式(非引导)

PHP While循环中的纯CSS模式(非引导),php,jquery,ajax,Php,Jquery,Ajax,我有一个纯粹的基于css的模式,因为出于某种原因,我没有在项目上使用引导。当在通过while循环获取的记录中单击链接时,模式应该打开。现在的问题是,我想根据创建模式的特定记录获取和显示记录,因为不同的记录当然有不同的数据,但我不知道如何做。这是我的密码 <?php while($rm = $rooms->fetch()){ ?> <tr> <td class="text-left"><?php echo $rm['rm_name'];

我有一个纯粹的基于css的模式,因为出于某种原因,我没有在项目上使用引导。当在通过while循环获取的记录中单击链接时,模式应该打开。现在的问题是,我想根据创建模式的特定记录获取和显示记录,因为不同的记录当然有不同的数据,但我不知道如何做。这是我的密码

<?php while($rm = $rooms->fetch()){ ?>
  <tr>
    <td class="text-left"><?php echo $rm['rm_name']; ?></td>
    <td><?php echo $rm['rm_max_children']; ?></td>
    <td><a href="#modal-one" class="modelView" data-id="<?php echo $rm['rm_id'];?>">View</a></td>
    <td></td>
  </tr>
<?php } ?>
<div class="modal" id="modal-one" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-header">
      <h2>Facilities</h2>
      <a href="#" class="btn-close" aria-hidden="true">×</a>
    </div>
    <div class="modal-body">
      <div class="modelContent">Different record as per id to be displayed here by field <?php echo $rm['rm_facilities']; ?></div>
    </div>
    <div class="modal-footer">
      <a href="#" class="btn">Close</a>
    </div>
  </div>
</div>

我搜索了一些类似的问题,但都与bootstrap有关。我还试着将它们从引导程序中分离出来,并在我的引导程序上进行尝试,但它们似乎不起作用

这里有两个想法

第一:使用数据符号。静态示例是 $document.readyfunction{ $'.btn关闭'。单击函数E{ $'.modal'.hide; }; //默认情况下隐藏模态 $'.modal'.hide; $'.modelView'。单击函数E{ var id=$this.data'id'; var name=$this.data'name'; var children=$this.data'children'; var description=$this.data'description'; $'RoomId'.textid; $'RoomName'.textname; $‘RoomChildren’。textchildren; $'RoomDescription'.textdescription; //显示模态 $'.modal'.show; }; }; 名称 儿童 1号房间 4. 房间2 3. 设施 房间号: 房间名称: 儿童: 房间描述:
我不明白你想要什么?你想要模态的CSS或者如何从while循环中显示此模态中的内容?我想要如何从while循环中显示此模型中的内容..单击show MODAL会得到什么响应?JSON还是HTML?现在什么都没有。无论我尝试什么,都会出现未定义的错误,所以我删除了这些代码。