Hi Guys
I have read through your forum and it has been so helpful thanx so much however I am stuck now and I will apreciate some help plaese. I have tried to construct the "checkbox" form in order to display and/or delete uploaded mp3 files.
When I click the Delete btn the page only refreshes and the file does not get deleted as its still displayed on the refreshed list and still lying in the dir.
Can someone please tell me what I'm doing wrong?
Thanx in advance:
<?phpif(isset($_POST[$file])){$checkbox = $_POST[$file];if($checkbox == on) { //checkbox is selectedunlink($file);if(!unlink($file)) die("Failed to delete file");}}$dir = opendir("./$id/");while (false !== ($file = readdir($dir))) {if (strpos($file, '.MP3',1)) {echo '<html><form method="post">';echo "{$file}<input type=CHECKBOX name=$file>";echo '<input type="submit" name="submit" value="Delete" /><br />';echo '</form>';}}?>