Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/02/2005, 12:02
vertiente
 
Fecha de Ingreso: febrero-2005
Mensajes: 67
Antigüedad: 19 años, 2 meses
Puntos: 0
Borrar registro de una db

Hola gracias a ustedes llegue hasta aqui, pero deseo incluir en la pagina de consulta siguiente un enlace para borrar el registro encontrado

Código PHP:
<? 
    $cnx 
mysql_connect("localhost","root",""); 
           
mysql_select_db("DB"); 
    if (!
$cnx
        echo 
mysql_error(); 
    else 
$busca="%".$_POST['link']."%"
$sql mysql_query("SELECT * FROM site_coches WHERE link LIKE '$busca' ORDER BY id DESC"); 
while(
$row=mysql_fetch_array($sql)){ 
echo
"<table width='320'  border='0' cellspacing='1' cellpadding='0'> 
  <tr bgcolor='#FFFF99'> 
    <td width='62%' height='17'><div align='left'><strong>&nbsp;Referencia: </strong>"
.$row['link']."</div></td> 
    <td width='38%'><div align='left'><strong>&nbsp;ID: </strong>"
.$row['id']."</div></td> 
  </tr> 
</table>"


mysql_close($cnx); 
?>
Al lado de ID iria un boton para eliminar