Thanx, but I made the filenames work after while trying

. The problem now is the delete script.
Heres the list files script, and it works, perfectly:
Code: Select all
<?php
$dirnavn = "../produkter";
$opendir = opendir( $dirnavn );
while( $file = readdir( $opendir ) )
{
print('<input type="checkbox" name="'."slett".'" value="'."$file".'">'."$to_start$file$to_end<br>\n");
}
?>
But the delete script want work as it's supposed to:
Code: Select all
<?php
$dirnavn = "../produkter";
$opendir = opendir( $dirnavn );
if( ! isset( $_POSTї'slett'] ) )
{
header( "Location: http://www.zeceer.tk" );
}
while( $file = readdir( $opendir ) )
{
if( $_POSTї'slett'] == $file )
{
print("Deletet<br>");
}
else
{
print("Not Deleted<br>");
}
}
?>
The problem is that if I check more than one of the checkboxes, it only delete one of the files. The unset() function are here print("Deleted");. Just haven't used the unset() yet since I'm still testing. But by if I select all of the checkboxes for an example, it goes like this
Code: Select all
Not Deleted
Not Deleted
Not Deleted
Not Deleted
Deleted