Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2012, 13:24
rimox
 
Fecha de Ingreso: marzo-2012
Mensajes: 17
Antigüedad: 13 años
Puntos: 0
borrar datos de una tabla mysql

Código PHP:
<html>
<head>
   <title>Ejemplo de PHP</title>
</head>
<body>
<h1><center>Eliminar Equipos</center></h1>
<?php

$link 
mysql_connect("localhost""root""");

mysql_select_db("proevo"$link);

$result mysql_query("SELECT id, id_equipo FROM ligascenso ;"$link);

if (
$row mysql_fetch_array($result)){

echo 
"<table align='center' border = '1' >";

echo 
"<tr>";

echo 
"<td width='50' align='center'><b>ID</b></td>";
echo 
"<td width='200' align='center' ><b>Equipo</b></td>";
echo 
"<td width='50' align='center'><b>Eliminar</b></td>";


echo 
"</tr>";

do {

echo 
"<tr>";

echo 
"<td align='center'>".$row["id"]."</td>";

echo 
"<td align='center'>".$row["id_equipo"]."</td>";

echo 
"<td align='center'><a href=\"borra.php?id=%d\"> Borra </a></td></tr>";




echo 
"</tr>";


} while (
$row mysql_fetch_array($result));
} else {

echo 
"¡ La base de datos está vacia !";

}

?>



   </td> </tr>
</table>

</body>
</html>
Los datos si aparecen lo unico que al presionar eliminar no elimina el registro...

espero y me puedan ayudar ok