<?php
include "../classes/db.class.php";
session_start();

$db = new db();

$username = $_GET['username'];
$password = $_GET['password'];
$user_type = $_GET['user_type'];
$user_id = $_GET['user_id'];
$status = $_GET['status'];
$farm_id = $_GET['farm_id'];
$admin = $_GET['admin'];

$res = $db->Update('users', ['username', 'status', 'password', 'user_type', 'farm_id', 'admin'], ["$username", "$status", "$password", "$user_type", "$farm_id", "$admin"], "record_id = $user_id");
if ($res) {
    echo 1;
} else {
    echo 0;
}
