Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\Web-RestoranTableService-master\pagePelanggan.php on line 16
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\Web-RestoranTableService-master\pagePelanggan.php on line 26
AuthUser($_SESSION['username']);
$auth2 = $id->AuthPelanggan($_SESSION['username']);
$response = $id->sessionCheck();
if ($response == "false") {
header("Location:index.php");
}
$no_meja = $auth2['no_meja'];
$sql2 = "SELECT kd_order FROM tb_order WHERE no_meja='$no_meja'";
$exe2 = mysqli_query($con, $sql2);
$num2 = mysqli_num_rows($exe2);
$dta2 = mysqli_fetch_assoc($exe2);
$data_kd = $dta2['kd_order'];
$sql3 = "SELECT status_detail FROM tb_detail_order_temporary WHERE order_kd='$data_kd'";
$exe3 = mysqli_query($con, $sql3);
$num3 = mysqli_num_rows($exe3);
$dta3 = mysqli_fetch_assoc($exe3);
$data_kd2 = $dta3['status_detail'];
$sql4 = "SELECT status_order FROM tb_order WHERE kd_order='$data_kd'";
$exe4 = mysqli_query($con, $sql4);
$num4 = mysqli_num_rows($exe4);
$dta4 = mysqli_fetch_assoc($exe4);
$data_kd3 = $dta4['status_order'];
if (isset($_GET['delete'])) {
if ($data_kd3 == "belum_beli") {
?>
$(document).ready(function() {
swal({
title: "Tidak Order?",
text: "Anda belum membeli apapun",
type: "warning",
showCancelButton: true,
confirmButtonText: "Ya, Tidak Beli",
cancelButtonText: "Beli",
closeOnConfirm: false,
closeOnCancel: true
}, function(isConfirm) {
if (isConfirm) {
<?php
$response = $id->delete("tb_order", "kd_order", $_GET['kd'], "?page=dashboard");
$id->logout2();
?>
} else if (!isConfirm) {
window.location.href = "?";
}
});
})
'negative', 'alert' => 'Pesanan anda belum sampai'];
} elseif ($data_kd2 == "siap" || $data_kd2 == "diambil") {
$response = $id->delete("tb_detail_order_temporary", "kd_order", $_GET['kd'], "?page=dashboard");
$id->logout2();
}
}
?>
What I have tried:
searches but useless i asked to seniors but they not found it