Initial Commit: Tugas Semua Pertemuan
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include 'koneksi.php';
|
||||
|
||||
$id = $_POST['id'] ?? '';
|
||||
$nama = $_POST['nama'] ?? '';
|
||||
$no = $_POST['no'] ?? '';
|
||||
$status = $_POST['status'] ?? '';
|
||||
|
||||
if($id == "" || $nama == "" || $no == "" || $status == ""){
|
||||
echo "DATA TIDAK LENGKAP";
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt = $conn->prepare("UPDATE spbu SET nama_spbu=?, no_spbu=?, status=? WHERE id=?");
|
||||
$stmt->bind_param("sssi", $nama, $no, $status, $id);
|
||||
|
||||
if($stmt->execute()){
|
||||
echo "success";
|
||||
}else{
|
||||
echo "MYSQL ERROR: " . $stmt->error;
|
||||
}
|
||||
$stmt->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user