Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/12/2011, 09:48
anmeric
 
Fecha de Ingreso: diciembre-2011
Mensajes: 9
Antigüedad: 12 años, 5 meses
Puntos: 0
eliminar registros con check

Bueno mi pregunta es la siguiente y agradeceria un monton quien pueda ayudarme, estoy empezando con php y tengo dudas como eliminar registros que han sido 'checked', genero una lista con todos los registros de la base de datos en mysql, pero no se como hacer para que elimine los seleccionados, el que me pueda ayudar se lo agradeceria, aqui esta el codigo:

<?php


$conn = mysql_connect('localhost','root','')or die ('Ha fallado la conexión: '.mysql_error());
$sql = "select * from table.usuarios";
mysql_select_db('table')or die ('Error al seleccionar la Base de Datos: '.mysql_error());

$result = mysql_query($sql);
?> <form method="post" >
<input name="" type="button" value="Agregar" onClick="agrega()" ><input name="" type="button" value="Actualizar"><input name="" type="button" value="Eliminar">
<table width='943' border='1' align='left' >
<?php
while ($row = mysql_fetch_array($result))
{
?>
<tr>
<td width='25'>&nbsp;<input name='check>' type='checkbox' value='' ></td>
<td width='77'>&nbsp;<input name='' type='text' width='65px' value ="<?php echo ($row[0]); ?>"></td>
<td width='25'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[1]); ?>"></td>
<td width='90'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[2]); ?>"></td>
<td width='176'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[3]); ?>"></td>
<td width='88'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[4]); ?>"></td>
<td width='88'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[5]); ?>"></td>
<td width='88'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[6]); ?>"></td>
<td width='88'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[7]); ?>"></td>
<td width='88'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[8]); ?>"></td>
<td width='97'>&nbsp;<input name='' type='text' width='10px' value ="<?php echo ($row[9]); ?>"></td>
</tr>
<?php

}
?>
</table>
</form>