prepare($sql); $stmt->bind_param("i", $id_kasir); // Execute the query if ($stmt->execute()) { // Redirect back to the user list after successful deletion header("Location: index.php"); exit; } else { // If deletion fails, show an error message echo "Error deleting record: " . $conn->error; } } // Close the connection $conn->close(); ?>