Hi do you know what's wrong with the coding at the bottom then. Say for the following file structure:
home/html/bandname/bass_tabs
home/html/bandname/drum_tabs
home/html/bandname/guitar_tabs
home/html/bandname/lyrics
$dizin = "home/html/bandname" & $FORM{'sec'}"; would equal "bass_tabs".
Basically if they I to delete a directory named bass_tabs, drum_tabs, guitar_tabs or lyrics it gives an error (which works fine). But I try to delete the bandname directory then:
$dizin = "home/html" & $FORM{'sec'}"; would equal "bandname".
What it does then is checks to see if there's any files in the any of the directories. If not it deletes all of the directories. But I seem to get the error "There's still some tabs in the bass_tabs directory." when there's no files or directories in that directory. I'd be greatful if you can help. Thanx
Here's the coding:
$dirname = "$FORM{'sec'}";
if ($dirname eq "bass_tabs"

{ &mesaj("ERROR","You're not allowed to delete this directory."

; }
if ($dirname eq "drum_tabs"

{ &mesaj("ERROR","You're not allowed to delete this directory."

; }
if ($dirname eq "guitar_tabs"

{ &mesaj("ERROR","You're not allowed to delete this directory."

; }
if ($dirname eq "lyrics"

{ &mesaj("ERROR","You're not allowed to delete this directory."

; }
$dizin_temp = "$dizin/$dirname";
unless(<$dizin_temp/bass_tabs/*>) { &mesaj("ERROR","There's still some tabs in the bass_tabs directory."

; }
unless(<$dizin_temp/drum_tabs/*>) { &mesaj("ERROR","There's still some tabs in the drum tabs directory."

; }
unless(<$dizin_temp/guitar_tabs/*>) { &mesaj("ERROR","There's still some tabs in the guitar_tabs directory."

; }
unless(<$dizin_temp/lyrics/*>) { &mesaj("ERROR","There's still some tabs in the lyrics directory."

; }
rmdir($dizin_temp/bass_tabs) || &mesaj("ERROR","Directory could not be deleted. Please check for the directory permission and be sure that there is no file in the directory."

;
rmdir($dizin_temp/drum_tabs) || &mesaj("ERROR","Directory could not be deleted. Please check for the directory permission and be sure that there is no file in the directory."

;
rmdir($dizin_temp/guitar_tabs) || &mesaj("ERROR","Directory could not be deleted. Please check for the directory permission and be sure that there is no file in the directory."

;
rmdir($dizin_temp/lyrics) || &mesaj("ERROR","Directory could not be deleted. Please check for the directory permission and be sure that there is no file in the directory."

;
rmdir($dizin_temp) || &mesaj("ERROR","Directory could not be deleted. Please check for the directory permission and be sure that there is no file in the directory."

;