alert('Events Added Successfully');window.location.href='view-event.php';";
}
}
if(isset($_POST['updateeventid']))
{
$updateeventid=$_POST['updateeventid'];
$updateeventname=$_POST['updateeventname'];
$updateeventstartdate=$_POST['updateeventstartdate'];
$updateeventenddate=$_POST['updateeventenddate'];
$updatenotificationdate=$_POST['updatenotificationdate'];
$updateeventmessage=$_POST['updateeventmessage'];
$insert="UPDATE `events` SET `event_name`='$updateeventname',`startdate`='$updateeventstartdate',`enddate`='$updateeventenddate',`notificationdate`='$updatenotificationdate',`message`='$updateeventmessage' WHERE id='$updateeventid'";
$run_event=mysqli_query($conn,$insert);
if($run_event)
{
echo "";
}
}
if(isset($_POST['deleteeventremovegetid']))
{
$deleteeventremovegetid=$_POST['deleteeventremovegetid'];
$delete="DELETE FROM `events` WHERE id='$deleteeventremovegetid'";
$run=mysqli_query($conn,$delete);
if($run)
{
echo "";
}
}
?>