RE:variable datos de un checkbox
Pongo mi codigo, haber si algún chico amable me ayuda.
Los registros me los borra (num,descripcion, etc..) lo que quiero es que me borre
el fichero es decir la foto real, que esta en la carpeta UPLOAD
<?php require_once('Connections/conectacalvario.php'); ?>
<?php $ez.="<a href="javascript:window.history.back()">Volver</a>"; ?>
<?php
mysql_select_db($database_conectacalvario, $conectacalvario);
$query_registros = "SELECT fecha, `desc`, foto, num FROM noticias ORDER BY fecha ASC";
$registros = mysql_query($query_registros, $conectacalvario) or die(mysql_error());
$row_registros = mysql_fetch_assoc($registros);
$totalRows_registros = mysql_num_rows($registros);
?>
<?
$userfile=$_FILES['userfile']['name'];
$mivalor= $_GET['userfile'];
$directorio = '/var/www/calvario/upload/';
?>
<?php
if (isset($_POST['eliminar_seleccion']))
if (count($_POST['seleccion']))
foreach($_POST['seleccion'] as $num => $valor)
mysql_query("DELETE FROM noticias WHERE num = ".$num." LIMIT 1");
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<?php do { ?>
<table border="0" cellpadding="5">
<!--DWLayoutTable-->
<tr>
<td width="95" height="39" valign="top"><?php echo $row_registros['num']; ?></td>
<td width="102" valign="top"><?php echo $row_registros['fecha']; ?></td>
<td width="339" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="263" height="38" valign="top"><?php echo substr($row_registros['desc'],0,100); ?> </td>
<td width="64"> </td>
</tr>
</table></td>
<td width="85"> </td>
<td width="97" valign="top"><div align="left"><?php echo $row_registros['foto']; ?></div></td>
<td width="35"> </td>
<td width="20" valign="top" nowrap><input type="checkbox" name="seleccion[<?php echo $row_registros['num']; ?>]" /></td>
</tr>
<tr>
<td colspan="7" valign="top" bgcolor="#990000"> <img src=/img/space.gif width=1 height=1></td>
</tr>
<tr>
<td height="13"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<?php } while ($row_registros = mysql_fetch_assoc($registros)); ?>
<input name="eliminar_seleccion" type="submit" value="Eliminar Seleccion" />
</form>