mohon bantuan nya ane mau update dan delete data yang udah ane tampilin
tp ini update nya tanpa ane input tp hanya klik button acc data yang status awal nya pending langsung ke update jadi terima
ini koding tampil
<?php
include "../koneksi.php";
$sql= "SELECT * FROM cuti where nik_a ='" . $_SESSION . "' && status = 'Pending'";
$result=mysql_query($sql);
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h3>Approve Cuti</h3>
<table class="table table-bordered" action="aprovecuti.php">
<thead>
<tr>
<th>No Slip</th>
<th>NIK</th>
<th>Nama</th>
<th>Tanggal</th>
<th>Alasan</th>
<th>Tgl Cuti</th>
<th>Total Hari</th>
<th>Keterangan</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><?php echo $rows; ?></td>
<td><input type="submit" name="acc" onclick="return confirm('ACC permintaan cuti <?php echo $rows; ?> ?');" value="ACC"></a>  <input type="submit" name="tolak" onclick="return confirm('Tolak permintaan cuti <?php echo $rows; ?> ?');" value="X"></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</body>
</html>
Silahkan
login untuk menjawab!