<?php
/**
 * Processing Forget password form data:
 * check data then generate new password and send it through SMPT Email
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    10-08-2020
 * @edited_by      Mohammad aljaouni
 * @last_edit_date 10-08-2020
 * @todo           Nothing
 */
ob_start();
session_start();
if(empty($_POST['id'])){
	exit("0");
}
$chain = "AWdrh78y892Djk*^523*%$#ghgHGHia&%$*)AsfdsLJnLaad";
include("validateLogin.php");
include("includeInformation.php");
$cate='';
if(!empty($_POST["cate"]))
	$cate=rtrim(implode(",",$_POST["cate"]));
$res=mysqli_query($conn, "UPDATE `user_login` SET `admin_groups`='".mysqli_real_escape_string($conn, $cate)."' WHERE `id`=".mysqli_real_escape_string($conn, $_POST['id']));
if($res) {
	exit("1");
} else {
	exit("0");
}
ob_end_flush();
?>
