  <?php require_once('../auth/auth.php');?>
<?php
if (isset($_POST['delid'])) {
 mysqli_query($conn,"DELETE from events WHERE  id='".$_POST['delid']."' AND coid='$coid' AND bid='$bid' AND brid='$brid' ");
echo mysqli_affected_rows($conn);
}
?>


<?php
if (isset($_POST['updateid'])) {
mysqli_query($conn,"UPDATE events SET title='" . $_POST['title'] . "',start='" . $_POST['start'] . "',end='" . $_POST['end'] . "' WHERE coid='$coid' AND bid='$bid' AND brid='$brid' AND  id='".$_POST['updateid']."' ");
echo mysqli_affected_rows($conn);
}

?>