1-Este pagina muestra los datos de la tabla y al lado un link que lo puede borrar. se llama : borrar.php
Código PHP:
<?php
include("conex.php");
$link=Conectarse();
$consulta=mysql_query("select * from cliente",$link);
?>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR><TD> <B>Rut</B></TD> <TD> <B>Nombre</B></TD> <TD> <B>Apellido</B> </TD> <TD> <B>Borrar</B> </TD></TR>
<?php
while($row = mysql_fetch_array($consulta)) {
printf("<tr> <td> %s</td> <td> %s </td> <td> %s </td> <td> <a href=\"procesa_borra.php?id=%s\">Borrar</a></td> </tr>", $row["rut_cliente"],$row["nom_cliente"],$row["ape_cliente"],$row["borra"]);
}
mysql_free_result($consulta);
mysql_close($link);
?>
</table>
Código PHP:
<?php
include("conex.php");
$link=Conectarse();
$id=$_GET['id'];
mysql_query("delete from cliente where rut = $id",$link);
// aqui abajo da el error la funcion header
header("Location: borrar.php");
?>
Desde ya grax