<?php include"../../connect/db.php" ?>
<?php 

    if( isset($_POST['id']) ){

            $id = mysqli_real_escape_string($con,$_POST['id']);
            $user = mysqli_real_escape_string($con,$_POST['user']);
            $amount = mysqli_real_escape_string($con,$_POST['amount']);
            $method = mysqli_real_escape_string($con,$_POST['method']);
            $status = mysqli_real_escape_string($con,$_POST['status']);
            $address = mysqli_real_escape_string($con,$_POST['address']);

            $query = mysqli_query($con,"UPDATE withdraw SET  user = '$user', amount = '$amount', method = '$method', status = '$status',  address = '$address' WHERE id = '$id'  ");

            if( $query ){
                echo "done";
            }
            else{
                echo "error"; 
            }

    }


?>