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

// now we will get the link...
$user_view_id = $_GET['userID'];
$deleteID = $_GET['deleteID'];
$passport = $_GET['deleteProof'];
    $sql_delete = "DELETE FROM deposit_logs WHERE id = '$deleteID'";
    $query_trans_update = $db_conx->query($sql_delete);

$path = "../../../user/proof/".$passport;

// echo $path;

if (!unlink($path)) {
    echo "you have an error!";
} else {
    echo "success document ";
}

    if($query_trans_update){

        echo "Success";
        header('location:../../principal/history_deposit.php?depositDelete=true&userID='.$user_view_id);
    }else{
        echo "failed";
    }
