<?php
session_start();
require_once '../Server/connection.php';
//$user_id = $_SESSION['user_id'];
$remarks = $_POST['remarks'];
$userId = $_POST['user_id'];

$query153 = "select * from users where user_id='$userId'";
$result153 = $conn->query($query153);
$row153 = $result153->fetch_array();
$status33 = $row153['status'];

if($status33==1){
	
$sql = "UPDATE users SET remarks = '$remarks',status=0 WHERE user_id = '$userId'";

if($conn->query($sql) === TRUE) {
	
//$_SESSION['success_message'] = "Your Password Has Been Changed Successfully";
                        header("Location: ../manage_users.php");
                             //exit();	
	
	
}
	
}else {
	
$sql = "UPDATE users SET remarks = '$remarks',status=1 WHERE user_id = '$userId'";

if($conn->query($sql) === TRUE) {
	
//$_SESSION['success_message'] = "Your Password Has Been Changed Successfully";
                        header("Location: ../manage_users.php");
                             //exit();	
	
	
}	
	
	
}






?>