Ver Mensaje Individual
  #8 (permalink)  
Antiguo 06/08/2003, 22:20
TiMeSxz
 
Fecha de Ingreso: junio-2003
Ubicación: Barcelona
Mensajes: 51
Antigüedad: 20 años, 10 meses
Puntos: 0
me sabe muy mal ser pesado pero ando algo perdido y lo siento
pero no me funciona todabia :(

os pongo el codigo tal como esta ahora despues de haberme ayudado:

Código PHP:
<?php
  mysql_connect
("localhost""""");
  
mysql_select_db("timesxz");

if (isset(
$_GET['borrar'])) { // faltaba el cierre del paréntesis del if()
    
if (mysql_query("DELETE FROM noticias WHERE id=".$_GET['ID'])) {
    echo 
"<p><b>Borrado correcto</b></p>";
}
}



$busqueda mysql_query("SELECT titulo, texto, autor, ID, fecha FROM noticias ORDER BY ID DESC");
 

while (
$row mysql_fetch_array($busqueda))
{
    echo(
"<table width='100%' height='71' border='0'>
  <tr bgcolor='#000033'> 
    <td width='55%' height='21'><font color='#FFFFFF'>"
$row["titulo"]." </font></td>
    <td width='45%'><font color='#FFFFFF'>"
$row["fecha"]."</font></td>
  </tr>
  <tr bgcolor='#000066'> 
    <td height='21' colspan='2'><font color='#999999'>"
$row["texto"]."</font></td>
  </tr>
  <tr bgcolor='#000033'> 
    <td><font color='#FFFFFF'>"
$row["autor"]."</font></td>
    <td><font color='#FFFFFF'>ID # "
$row["ID"]." <a href=\posts.php?borrar=1&id=".$row["ID"].">Borrar</a></font></td>
  </tr>
</table><br><br><br>"
);  
}
?>
Por ejemplo al querer borrar la noticia conel ID 26 le doy a "borrar" y me envia a una web que no existe, busca la url
posts.php?borrar=1&id=26

que es lo que falla?
muchas gracias por la ayuda