function checkIfAppointmentExistsApp($con) { $sql = "SELECT * FROM appointments WHERE ID=" . $_GET['app']; $appointmentMatchWithId = pushQueryToArray($con, $sql); if (!empty($appointmentMatchWithId)) { return checkIfAppointmentBelongsToUser($con); } else { $_SESSION['errorDetailPage'] = "Deze afspraak bestaat niet, probeer het alstublieft opnieuw."; header('Location: ../pages/appointmentsoverview.php'); die; } }
function checkIfSetDelete($con) { if (isset($_POST['delete'])) { checkIfAppointmentBelongsToUser($con); } }