Ver Mensaje Individual
  #12 (permalink)  
Antiguo 05/12/2011, 23:24
Avatar de mko
mko
 
Fecha de Ingreso: agosto-2010
Ubicación: la vida es un riesgo
Mensajes: 101
Antigüedad: 13 años, 8 meses
Puntos: 14
Respuesta: Eliminar datos con checkbox en mysql con php

orw28
PRUEBA ASI Y MODIFICALO EN TEORIA DEBE FUNCIONAR PRUEBALO LO HICE A LA CARRERITA

Código PHP:

//aqui tu conexion
       
$result2 mysql_query("SELECT * FROM libros"$con);
       if (
$row mysql_fetch_array($result2))
            { 
            

        
            
            
            echo
"<form action='eliminarlibro.php.php' method='post'>";
            echo 
"<table  align='center'>";
            echo
"<tr>
            <td>nombre del libro</td>
            <td>seleccione</td>                  
            </tr>"

             
            do { 
             echo 
"<tr><td>".$row["nombre"]."</td>
                       <td><input name='checkbox[]' type='checkbox' id='checkbox[]' value='"
.$row["titulo"]."'></td>";
             echo 
"</tr>" ;
             
           }
           echo
"<tr><td colspan='2'><input type='submit' value='Eliminar' name='eliminar'><input type='reset' name='borrar' value='Borrar'></td></tr>
           <table>"
;
            while (
$row mysql_fetch_array($result2)); 

 
       } else { 
       echo 
"<div  class='noresultado'>****no existen libros****</div>"
       } 
__________________
cuando no esperas nada y obtienes todo eso es destino