Ver Mensaje Individual
  #10 (permalink)  
Antiguo 02/06/2008, 16:34
evoLuchox
 
Fecha de Ingreso: enero-2008
Mensajes: 29
Antigüedad: 16 años, 3 meses
Puntos: 0
Respuesta: No me funciona el código

OK. Aquí está el código completo:

Código PHP:
<?
/* NOS CONECTAMOS A LA BASE DE DATOS */
include ("conex.php");

    
$idex=$_GET[id];

// Comprobamos si se quiere borrar alguna noticia.
if (isset($borrar)) {
    
mysql_query("DELETE FROM (tabla) WHERE id = $borrar");
header("Location: admin.php?id=".urlencode($idex)); 
}


// Seleccionamos todas las noticias de la base de datos.
$query "SELECT * FROM (tabla) WHERE iden = $idex";
$sql mysql_query($query);
?>
<html>
<head>
<title>Ikaruus || Exhibiciones</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
    background-color: #000000;
}
.Estilo1 {
    color: #FFFFFF;
    font-weight: bold;
    font-family: tahoma;
}
.Estilo2 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #CCCCCC;
    font-size: 12px;
}
.Estilo3 {
    font-family: VERDANA;
    font-size: 10px;
    color: #CCCCCC;
}
.Estilo4 {
    color: #FFFFFF;
    font-family: VERDANA;
    font-size: 9px;
}
-->
</style>
</head>
<body>
<p align="right"><a href="logout.php" class="Estilo2">[Desconectarse] </a></p>
<p align="left"><a href="agregar.php?id=<?=$idex?>" class="Estilo3">Agregar una imagen</a></p>
<p align="center" class="Estilo1">ADMINISTRADOR DE EXHIBICIONES</p>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="6%"><div align="center" class="Estilo2">#</div></td>
    <td width="32%"><div align="center" class="Estilo2"><strong>Título</strong></div></td>
    <td width="18%"><div align="center" class="Estilo2"><strong>Autor</strong></div></td>
    <td width="22%"><div align="center" class="Estilo2"><strong>IDEN</strong></div></td>
    <td width="11%"><div align="center" class="Estilo2"><strong>Editar</strong></div></td>
    <td width="11%"><div align="center" class="Estilo2">Borrar</div></td>
  </tr>
<?
$i 
0
while (
$row mysql_fetch_array($sql)){ 
$i++;  
?>
  <tr>
    <td><div align="center" class="Estilo4"><?=$i?></div></td>
    <td><div align="center" class="Estilo4"><?=$row[img_texto]?></div></td>
    <td><div align="center" class="Estilo4">
      <?=$row[img_por]?>
    </div></td>
    <td><div align="center" class="Estilo4"><?=$idex?></div></td>
    <td><div align="center"><a href="editar.php?id=<?=$row[id]?>" class="Estilo4">Editar</a></div></td>
    <td><div align="center"><a href="admin.php?borrar=<?=$row[id]?>" class="Estilo4">Borrar</a></div></td>
  </tr>
<? ?>
</table>


<p>&nbsp;</p>
<p align="left"><a href="agregar.php?id=<?=$idex?>" class="Estilo3">Agregar una imagen</a></p>
</body>
</html>