Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/08/2015, 08:41
Avatar de xfxstudios
xfxstudios
 
Fecha de Ingreso: junio-2015
Ubicación: Valencia - Venezuela
Mensajes: 2.448
Antigüedad: 8 años, 10 meses
Puntos: 263
Respuesta: Boton Eliminar registro en tabla

asi:
Código PHP:
Ver original
  1. <?php  
  2. //tomamos los datos del archivo conexion.php  
  3. include("conexion.php");  
  4. $link = Conectarse();  
  5. //se envia la consulta  
  6. $result = mysql_query("SELECT * FROM COCHES", $link);    
  7. //se despliega el resultado  
  8. echo "<div class='container'>";
  9. echo "<table class='table table-bordered'>";  
  10. echo "<tr>";  
  11. echo "<th>Nombre</th>";  
  12. echo "<th>Comentario</th>";  
  13. echo "<th>Fecha</th>";  
  14. echo "<th>Accion</th>";
  15. echo "</tr>";  
  16.  
  17. while ($row = mysql_fetch_row($result)){  
  18.     echo "<tr>";  
  19.     echo "<td>$row[1]</td>";  
  20.     echo "<td>$row[2]</td>";  
  21.     echo "<td>$row[3]</td>";
  22.     echo "<td><a class='btn' href='eliminar.php?id=".$row['0'].">Borrar Registro</a></td>";  
  23. }
  24.     echo "</tr>";  
  25.  
  26. echo "</table>";  
  27. echo "</div>";
  28. ?>
__________________
[email protected]
HITCEL