<?php
include '../config/index.php';
include '../module/index.php';
 
$data = new Database;

$con = $data->connect();

$user = new User($con);

$post = filter_var_array($_POST,FILTER_SANITIZE_FULL_SPECIAL_CHARS);

$cot    = $post['cot'];

if($user->getUserNameById($_SESSION['id'] )->cot == $cot){
   echo $data->redirect('../account/../index?auth=auth');
}else{
   $_SESSION['t_error_c']  = 'Incorrect COT CODE';
   echo $data->redirect('../account/../index?cot=cot');
}


?>