<?php 
include('../db_conx.php');

// now we will get the link...
$user_id = $_GET['userID'];
include('info.php');



// echo $userID;
// first of all we will delete every file uploaded by this account 

// deleting profile Images


$sql = "DELETE FROM confidential_table WHERE id = '$user_id'";
	$result = $db_conx->query($sql);

$sql2 = "DELETE FROM personal_identification WHERE id = '$user_id'";
	$result2 = $db_conx->query($sql2);

$sql3 = "DELETE FROM personal_information WHERE id = '$user_id'";
	$result3 = $db_conx->query($sql3);

	if ($result) {
		// header("location: ../admin/index.php?delete=successful");
		echo " success client";
		
	}else{
		echo 'there is an error client';
	}

    $sql_trans = "DELETE FROM transfer WHERE u_id = '$user_id'";
	$result_trans = $db_conx->query($sql_trans);

	if ($result_trans) {
		// header("location: ../admin/index.php?delete=successful");
		echo " success transaction";
		
	}else{
		echo 'there is an error transaction';
	}
		echo "<br />";



		echo "<br />";
    $sql_mt4 = "DELETE FROM deposit_logs WHERE user_id = '$user_id' ";
	$result_mt4 = $db_conx->query($sql_mt4);

	if ($result_mt4) {
		header('location:../../principal/index.php?DeleteUserStatus=true');
		echo " success mt4";
		
	}else{
		echo 'there is an error mt4';
	}
		echo "<br />";








	
?>