Ver Mensaje Individual
  #10 (permalink)  
Antiguo 30/01/2007, 14:42
moloshok
Invitado
 
Mensajes: n/a
Puntos:
Re: sistema de noticias con imagenes

Lo del link ya lo tengo solucionado pero a la hora de vernoticia.php me sale este error

Notice: Use of undefined constant id - assumed 'id' in /home/lokecom/public_html/noticias/modulos/vernoticia.php on line 3


esto es lo que he hecho

Código PHP:
<? 
//recibimos la variable id enviada en el enlace por GET
$id=$_GET[id];
//conectamos a la base
$conn=mysql_connect($server,$dbuser,$dbpass);
//Seleccionamos la base
mysql_select_db($database,$conn);
//hacemos las consultas
$resultid=mysql_query("select * from noticias where id='$id'",$conn);
while(
$damefila=mysql_fetch_array($resultid)) 
{
?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="60%" colspan="3" bgcolor="#FF9900">
    <p align="center" class="Estilo1"><font face="Arial" size="2"><?echo strip_tags($damefila->titulo)?></a></font></td>
  </tr>
  <tr>
    <td width="60%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
  </tr>
  <tr>
    <td width="60%" colspan="3">


      
      <table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber2">
        <tr bgcolor="#000066">
          <td width="20%" bgcolor="#000066">
            <div align="center"><span class="Estilo1"><font face="Arial" size="2"><?echo strip_tags($damefila->fecha)?></font></span></div></td>
          <td width="80%" rowspan="2" align="left" valign="top">
            <p align="left" class="Estilo1"> <font face="Arial" size="2"><?echo strip_tags($damefila->mensaje)?></font>             </td>
        </tr>
        <tr>
          <td width="20%" valign="top">
            <div align="center"><img border="0" src="fotos/<?echo strip_tags($damefila->foto)?>" width="99" height="99" align="center"> </div></td>
        </tr>
      </table>
      <p style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
    </td>
  </tr>
</table>
<? 
}
mysql_free_result($resultid);
?>