<?php
	include 'includes/session.php';
	include 'includes/sessions.php';

	if(isset($_POST['edit'])){
		$user_id = $_POST['id']; 
		$notice=$_POST['notice'];
	
			# code...

			$sql = "UPDATE notice SET notice='$notice' WHERE id='$user_id' ";
		if($conn->query($sql)){
			$_SESSION['success'] = 'Notice Updated successfully';

			
		}
		
		
	}
	
	else{
		$_SESSION['error'] = 'Fill up edit form first';
	}

	header('location:notices_list.php');

?>