function deleteEvent($day, $month, $year, $time, $buffertime, $userID) { foundAppointment($day, $month, $year, $userID); $q = "DELETE FROM `UCPM_appointments` WHERE (TIME(starttime) >= '{$time}') AND (TIME(starttime) <= '{$buffertime}') AND (DATE(starttime) = '{$year}-{$month}-{$day}') AND (userID='{$userID}') "; $result = mysql_query($q) or die(mysql_error()); checkDeleted($day, $month, $year, $buffertime, $userID); }
<section class="index"> <div class="thisday overview_thisday"> <h1>Today</h1> <h2><?php echo date("D") . ' ' . date("j") . ' ' . date("F"); ?> </h2> <ul> <?php getAppointments(date("j"), date("n"), date("Y"), $userID); ?> </ul> </div> <?php if (foundAppointment(date("j"), date("n"), date("Y"), $userID) == true) { ?> <div class="snooze_container"> <a href="snooze.php" alt=""> <div class="snooze red"> Emergency stop </div> </a> </div> <?php } ?> </section>