<?php

require 'admin-login.php';

$id = $_GET['id'];
$file = $_GET['file'];
$img_link = $_GET['link'];

$filename == $img_link;
  if (file_exists($filename)) {
    unlink($filename);
    echo 'File '.$filename.' has been deleted';
  }

mysqli_query($link, "DELETE FROM payment WHERE id = '$id' ");

header("Location: payment-settings.php");

?>