<?php

require 'admin-login.php';

$id = $_GET['id'];

$query = mysqli_query($link, "SELECT * FROM user WHERE email = '$id' ");
$user = mysqli_fetch_array($query);

$u_email = $user['email'];
$u_id = $user['id'];

$type = $_GET['type'];

if($type == "Accept"){
    mysqli_query($link, "UPDATE user SET kyc = 'Verified' WHERE email = '$id' ");

header("Location: kyc.php");
}elseif($type == "Reject"){
     mysqli_query($link, "UPDATE user SET kyc = 'Not Verified Yet' WHERE email = '$id' ");

header("Location: kyc.php");
}


?>