= 1) { $row = $res->fetch_assoc(); if($row['status'] == 'a') { mysqli_query($conn, "UPDATE orders SET status = 'd', arrived_date = CURDATE() WHERE id={$_POST['order_id']};"); } } header("Location: ./ActiveOrders.php"); die(); ?>