I got an error in this section, I don't have any ideas to fix this.
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\web_resto\pagePelanggan.php on line 16
Notice: Undefined index: status_order in C:\xampp\htdocs\web_resto\pagePelanggan.php on line 26
Code:
<?php
include "config/controller.php";
$id = new Resto();
session_start();
$auth = $id->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['order_kd'];
$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") {
?>