Jump to content
xisto Community

Drakos33

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. 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>';}}?>
  2. Hi GuysI 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>';}}?>
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.