php jquery弹出消息框在while循环中工作,但在弹出地址字段中显示所有条目的相同地址,任何人都可以告诉我我在哪里做错了提前谢谢
Html Jquery 脚本
<script type="text/javascript">
$(document).ready(function() {
$('#button').click(function(e) {
$('#modal').reveal({
animation: 'fade',
animationspeed: 600,
closeonbackgroundclick: true,
dismissmodalclass: 'close'
});
return false;
});
});
</script>
Html 表格和 PHP 页面
<table>
$query1=mysql_query("select * from customers order by id desc");
while($row1=mysql_fetch_array($result))
{
?>
<tr>
<td><div align="center"><?php echo $row1['firstname']; ?></div></td>
<td><div align="center"><?php echo $row1['lastname']; ?></div></td>
<td><div align="center"><?php echo $row1['dob']; ?></div></td>
<td><div align="center"><?php echo $row1['email']; ?></div></td>
<td><div align="center"><a href="#" class="button">Address</a></div></td>
<td><div align="center"><?php echo $row1['phone']; ?></div></td>
<td><div align="center"><?php echo $row1['country']; ?></div></td>
<td><div align="center"><?php echo $row1['city']; ?></div></td>
</tr>
<Popup Start>
<div id="modal">
<div id="heading">
Sign Up! Customer's Address
</div>
<div id="content">
<p><?php echo $row1['address']; ?></p>
</div>
</div>
<Popup End>
<?php }?>
</table>