<?php
session_start(); 

	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
		return;
	}
	
	
	$_SESSION['_token']=bin2hex(openssl_random_pseudo_bytes(16));
	
	
	include("connect.php");
include("mylibrary.php");


	$slotmid=$_POST['slotmid'];
	
		$slotname=$_POST['slotname'];
		$starttime=$_POST['starttime'];
		$endtime=$_POST['endtime'];
		
	

	 $eve = "update res_slots_master set slotname='$slotname',slotstarttime='$starttime',slotendtime='$endtime'where slotmid=$slotmid ";	
	if ($conn->query($eve) === TRUE)
	{			
		$_SESSION['msg'] = "Record has been updated successfully";			
	}
	
	header('Location: slots.php');
?>