<?php
header('Content-type: application/json');
include '../../config/database.php';
function _users_mode_huay($mid,$field,$mode){
	$conn = _connectDB();
	$sql = "UPDATE groupline SET ".$field."='".$mode."' WHERE groupline_api_key='".$mid."'";

	$result = $conn->query($sql);
	$res = ['status'=>true];
	return $res;
}
if(isset($_GET)){
	if(isset($_GET['mid'])){
		$mid = $_GET['mid'];
		$field = $_GET['field'];
		$mode = $_GET['mode'];
		echo json_encode(_users_mode_huay($mid,$field,$mode));
	}
}