Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2006, 05:52
silverrr111
 
Fecha de Ingreso: julio-2004
Mensajes: 45
Antigüedad: 19 años, 9 meses
Puntos: 0
Este script no da error ni hace nada????

Hola os posteo este script por que intento borrar un registro de la BD y no hace nada de nada.

noticias.php
Código HTML:
<body>
<form action="borrar.php" method="post">
<?php
include ("conexion.php");
$selec = mysql_query("SELECT * FROM noticias ORDER BY id DESC");
while ($row = mysql_fetch_array($selec)) {
?>
    <table width="45%" border="1" cellspacing="0" cellpadding="0">
    <tr>
    <td><h3><?=$row[titulo]?></h3></td>
    </tr>
    <tr>
    <td><h5><?=$row[nom]?></h5></td>
    </tr>
    <tr>
    <td><?=$row[noticia]?></td>
    </tr>
    <tr>
    <a href="borrar.php?id=<?=$row[id]?>">Esborrar</a>
    </tr>
    </table><br />
<?
    }
?> 
</body> 

borrar.php
Código PHP:
<? 
<?php
  $id
=$_POST[id];
  include (
"conexion.php");
  
mysql_query("DELETE FROM noticias WHERE id='$id'",$connect);
  
header("location: noticias.php");
?>
Ni borra ni nada, a ver si me echais una mano, gracias.