require_once "Events.php"; if (isset($_POST["search"])) { $events = new Events(); $result = $events->searchEvent(); echo $result; } if (isset($_POST["join"])) { $events = new Events(); $result = $events->joinEvent(); echo $result; } if (isset($_POST["leave"])) { $events = new Events(); $result = $events->leaveEvent(); echo $result; } if (isset($_POST["isMember"])) { $events = new Events(); $result = $events->isMember(); echo $result; } if (isset($_POST["editEvent"])) { $events = new Events(); $result = $events->editEvent(); echo $result; } if (isset($_POST["delete"])) { $events = new Events(); $result = $events->deleteEvent(); echo $result; }
function editEvent($inputs) { include "Events.php"; $event = new Events(); $event->editEvent($inputs[0]); }