Hola,
Intenta haci:
Código PHP:
<?php
$the_array = Array();
$handle = opendir('../imagenes/');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$the_array[] = $file;
}
}
closedir($handle);
sort ($the_array);
foreach($the_array as $val){
echo "<tr>
<td width='43'>
<input type='checkbox' name='val[]' value='$val' />
</td>
<td width='440' class='style3'>$val</td>
</tr>";
}
?>
y
Código PHP:
<?
foreach($_GET['val'] as $val2)
{
echo 'Deleting file [' . $val2. '] ... ';
unlink('../imagenes/'.$val2);
echo 'Done!<br />';
}
?>
Estube trabajando en algo similar y tenia un error y era porque a el name del checkbox le puse
algo y deveria ser
algo[].
Suerte
Salu2