// name of all event volunteers from the DB echo '<option>', $head['username'], '</option>'; } // we set a hidden input eventvol to eventvol, so that we know we want to assign an event to volunteer echo '</select><br><input type="hidden" name="eventvol" value="eventvol"/><input type="submit" value="Assign" /></form>'; } break; case 'eventcat': // case -> assign event to catagory if (isset($_POST['eventcat'])) { if (isset($_POST['eventname']) and isset($_POST['catname'])) { $e = new Event(); $c = new Catagory(); if ($e->select($_POST['eventname'])) { if ($c->select($_POST['catname'])) { echo $c->addEvent($e->getId()); // assigning the event to catagory } else { echo 'Catagory Does Not Exist'; } } else { echo 'Event Does Not Exist'; } } else { echo 'Please check your entries'; } } else { // displaying the list of all events and heads $e = new Event(); $c = new Catagory(); echo '<form method="POST">Select an Event and Head<br><select name="eventname">';