我正在尝试根据点击的ID查看数据,这是我用来捕捉点击的ID的按钮
<a href="viewfull.php?id=<?php echo $result->id?>"class="btn btn-warning"><i class="glyphicon glyphicon-zoom-in"></i> Edit </a>
这是我的viewfull.php代码
<?php
include 'koneksi/koneksi.php';
$ID = $_GET['id'];
$query = mysqli_query($con,"SELECT * FROM t_koperasi WHERE id_koperasi = '$ID'");
$result = mysqli_fetch_object($query);
include 'views/v_data.php';
这是回显数据的代码
<?php
while ($result = mysqli_fetch_object($query)) {?>
<h1>Nama Koperasi : <?php echo $result->nama_koperasi ?></h1>
问题是,当我单击查看按钮时,那里的数据不是空白