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

	if(isset($_POST['edit'])){
		$id = $_POST['id']; 
		$status=$_POST['status'];
		$sql = "UPDATE deposit SET status='$status' WHERE id = '$id'";
		if($conn->query($sql)){
			$_SESSION['success'] = 'Status updated successfully';
			

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

	header('location:pending_deposit.php');

?>