Ver Mensaje Individual
  #17 (permalink)  
Antiguo 08/06/2010, 09:48
Avatar de Most
Most
 
Fecha de Ingreso: marzo-2009
Mensajes: 642
Antigüedad: 15 años, 1 mes
Puntos: 6
Respuesta: mostrar en orden por ID (order by id desc limit 1)

muchas gracias, ahora otra cosa para no abrir otro tema, ya que viene a ser lo mismo, cuando le doy a ver mas se supone que me manda a /enlaces.php?ver=ID

pues bien, la ID la coge pero en archivo enlaces, se ve que no coge bien la ID :S

aqui el codigo:

Código HTML:
<html>
<head>
<title>pelis.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<?php
$connect=mysql_connect("","","");
var_dump($id); 
mysql_select_db("",$connect);
$sql = "SELECT * FROM enlaces WHERE id = $id";
$result = mysql_query($sql, $connect) or die (mysql_error());

while ($row = mysql_fetch_array($result)) { 
    $enlaces = $row['enlaces'];
	$detalles = $row['detalles'];
	$servidor = $row['servidor'];
	$anio = $row['anio'];
	$nombre = $row['nombre']; 
    $caratula = $row['caratula']; 
    $id=$row['id'];
}

?>
<table>
    <tr>
        <td rowspan="4"><img style="width: 120px; height: 180px;" src="<? echo $caratula; ?>" /></td>
        <td>
            <table>
                <tr>
                    <td><b>Nombre:</b> <? echo $nombre; ?></td>
                </tr>
                <tr>
                    <td><b>Año:</b> <? echo $anio; ?></td>
                </tr>
                <tr>
                    <td><b>Servidor:</b> <? echo $servidor; ?></td>
                </tr>
                <tr>
                    <td><b>Detalles/sinopsis:</b><br><textarea style="width:480px; height:100px; padding:5px"><? echo $detalles; ?></textarea></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<b>Links de descarga:</b><br><textarea style="width:480px; height:100px; padding:5px"><? echo $enlaces ?></textarea>
<?
?>
</body>


La variable $id me la da como null :S
</html>