G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php $pkgid = $_GET['pkgid']; include('config.php'); $js->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $result11 = $js->prepare('DELETE FROM `itinerary` WHERE `pkgid` = :pkgid '); $result11->bindParam(':pkgid', $pkgid); $result11->execute(); $result12 = $js->prepare('DELETE FROM `package` WHERE `pkgid` = :pkgid '); $result12->bindParam(':pkgid', $pkgid); $result12->execute(); $result13 = $js->prepare('DELETE FROM `packageimages` WHERE `package` = :pkgid '); $result13->bindParam(':pkgid', $pkgid); $result13->execute(); // PHP program to delete all // file from a folder // Folder path to be flushed $folder_path = "upload/package/".$pkgid; deletedirectory($folder_path); ?> <script type="text/javascript"> alert("Have Successfully Deleted"); window.location = 'view_packages.php' </script> <?php function deleteDirectory($dirPath) { $files = glob($dirPath . '/*'); foreach ($files as $file) { if (is_dir($file)) { deleteDirectory($file); } else { unlink($file); } } rmdir($dirPath); } ?>