<?php  session_start();

if(empty($_SESSION['LOGINID']) && empty($_SESSION['LOGINNM']) ){

	header("Location:login.php");
}
include_once("../header.php");

 ?>
 
 
 <?php if (isset($_POST['ev_id'])) { 
           $ev_id=intval($_POST['ev_id']);
		   $result = mysqli_query($connection, "SELECT * FROM `events` where id='$ev_id' ");
	       $list = mysqli_fetch_object($result);
		   $reason = $list->late_reason;
		   
?>

<form method="post" enctype="multipart/form-data" action="">
<center>
<input type="hidden" name="evn_id" value="<?php echo $ev_id; ?>" /> 
 <textarea name="reason" rows="2" cols="80" ><?php echo $reason; ?></textarea> <br>
 <input class="btn btn-primary" type="submit" name="submit_reason" value="Save Changes" />
  </form>
</center>
<?php
		   
 }
 
 
 ?>
