So, this is almost the along the same lines as my other post but not really and since I'm not that well versed in this I'm kinda stumped. So somehow I need to start out with this
$dir_path="../../Audio-MP3/Uploads/".$WebPage."/".stripslashes($Row["Directory"]);
if (is_dir($dir_path) && ($dir_handle = opendir($dir_path))) {
if (readdir($dir_handle) === false) {
rmdir($dir_path);
}
}
and put a type of else in there so that it says if readdir($dir_handle) is false go ahead and delete the directory but if there's something in there then delete the files so that you can delete the directory. Unless there's some sort of override that I could use instead of rmdir?