Postingan lainnya
Penyelesaian error unexpected T_ENCAPSED_AND_WHITESPACE
bagaimana cara penyelesaian error
</thead>
<?php
include 'config/connection.php';
$no = 1;
$sql = "SELECT detail_pembayaran.kd_detbayar,detail_pembayaran.status_bayar,pembayaran.kd_bayar,pembayaran.bukti,detail_booking.kd_detail,detail_booking.total_bayar,detail_booking.status_booking,booking.tgl_wisata,paket.nama_paket,desa.nama_desa FROM paket INNER JOIN desa ON desa.kd_desa=paket.kd_desa INNER JOIN booking ON paket.kd_paket=booking.kd_paket INNER JOIN user ON user.id_user=booking.id_user INNER JOIN detail_booking ON booking.kd_booking=detail_booking.kd_booking INNER JOIN pembayaran ON detail_booking.kd_detail=pembayaran.kd_detail INNER JOIN detail_pembayaran ON pembayaran.kd_bayar=detail_pembayaran.kd_bayar WHERE uname='$_SESSION[uname]'";
$query = mysqli_query($conn,$sql);
while ($data = mysqli_fetch_array($query)) {
?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $data['nama_desa']; ?></td>
<td><?php echo $data['nama_paket']; ?></td>
<td><?php echo $data['tgl_wisata']; ?></td>
<td>
<a href="#mymodal" data-toggle="modal" id="<?php echo $data['kd_detail']; ?>" class="btn btn-warning ">Upload Bukti</a>
<?php
$now = date("Y-m-d");
if ($data['status_bayar']=='lunas' && $data['tgl_wisata']>=$now) {
?>
<a href="bukti.php?kd_detail=<?php echo $data['kd_detail']; ?>" class="btn btn-success">Cetak Tiket</a>
<?php
}elseif ($data['tgl_wisata']<$now) {
echo "<a class='text-warning'>Kadaluarsa</a>";
}elseif (empty($data['bukti'])) {
echo "<a href='bukti.php?kd_detail=<?php echo $data['kd_detail']; ?>' class='btn btn-success' readonly>Cetak Tiket</a>";
}else{
echo "Menunggu";
}
?>
</td>
</tr>
</table>
0
2 Jawaban:
Jawaban Terpilih
coba ini <pre> echo "<a href='bukti.php?kd_detail=".$data['kd_detail']."' class='btn btn-success' readonly>Cetak Tiket</a>"; </pre>
1