<?php
	session_start();
	include"../../connect/db.php"; 
 ?> 
<?php
   
	if( isset($_POST['user']) ){

     $user = $_POST['user'];

     $sql = mysqli_query($con,"SELECT * FROM users WHERE account_num = '$user' ");
     $row = mysqli_fetch_assoc($sql);
     $email = $row['email'];
     $codelevel = $row['code_level'];
     if($codelevel == "nothing"){
         echo"error2";
     }else{
          $bxx = mysqli_query($con,"UPDATE users SET code_level = 'nothing' WHERE email = '$email' ");
     }
    
     if($bxx){
     echo"success";


     }
     else{
         echo"error";

     }
     
     }
     else{
         echo"error2";
     }
     
?>