La idea es ver unas noticias en una tabla (meta lograda) que tengo en una base de datos y cada noticia tendria un boton "eliminar" (meta semi-lograda) ya que cada noticia tiene un texto eliminar que parece boton......solo que no funciona como tal.
Código PHP:
<?php
$conexion = mysql_connect('localhost', 'pablo', 'pablo');
mysql_select_db('auto concept club');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$queEmp = "SELECT * FROM noticias ORDER BY fecha DESC";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
while ($registro = mysql_fetch_array($resEmp)) {
?>
<div id="tabla">
<table width="410" border="0" cellpadding="1" cellspacing="4" bordercolor="#000000">
<tr>
<td width="35%" class="Estilo4"><?php echo $registro['fecha']; ?></td>
<td width="26%"> </td>
<td width="20%"> </td>
<td width="19%"> </td>
</tr>
<tr>
<td class="Estilo1"><?php echo $registro['titulo']; ?></td>
<td class="Estilo4"><?php echo $registro['zona']; ?></td>
<td class="Estilo7"><div align="center">Modificar</div></td>
<td class="Estilo6"><div align="center">Eliminar</div>
<?
$sSQL="Delete From noticias Where titulo='$registro'";
$dilit=mysql_query($sSQL);
while ($row=mysql_fetch_array($dilit))
mysql_free_result($dilit)
?> </td>
</tr>
<tr>
<td colspan="4" class="Estilo2"><?php echo $registro['noticia_completa']; ?></td>
</tr>
<?php
}
mysql_free_result($resEmp);
mysql_close($conexion);
?>
</table>
</div>
</body>
</html>