alert("Input data terlebih dahulu")'; } else { $query = "UPDATE list_barang SET nama_barang='$namabarang',jumlah_stock='$jumlah' WHERE id='$id'"; $data = mysqli_query($conn, $query); $cek = mysqli_num_rows($data); if ($cek >= 0) { header("Location: dashboard.php"); } else { echo ''; } } ?>