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>";
}
?>
para el unlink
Código PHP:
<?
foreach($_GET['val'] as $val)
{
echo 'Deleting file [' . $val . '] ... ';
unlink('../imagenes/'.$val);
echo 'Done!<br />';
}
?>
perdón por modificar la pregunta