<?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'];

mysqli_query($link, "UPDATE user SET withdrawal_access = 'Allowed', account_status = 'Active', trade_mode = 'On' WHERE email = '$id' ");

header("Location: user-details.php?id=$u_id");

?>