Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/08/2011, 14:34
SantosMc03
 
Fecha de Ingreso: agosto-2011
Ubicación: en mi casa
Mensajes: 37
Antigüedad: 12 años, 8 meses
Puntos: 1
falla en leer los mp

Buenas gente.
Si alguien me puede ayudar con esto porfavor...

Código PHP:
<?php 
# Incluimos la configuracion
include('config.php'); 
session_start();
if(
$_SESSION['logueado'] != "SI"){
function 
form(){
global 
$link;
# Buscamos los mensajes privados
$sql "SELECT * FROM 'mensaje' WHERE para='".$_SESSION['s_username']."'";
$res mysql_query($sql$link) or die(mysql_error());
}
}
?>
Menu: <a href="listar.php">Ver mensajes</a> | <a href="crear.php">Crear mensajes</a> | <a href="cerrar.php">Cerrar sesion</a><br /><br />
  <table width="800" border="0" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td width="53" align="center" valign="top"><strong>ID</strong></td>
      <td width="426" align="center" valign="top"><strong>Asunto</strong></td>
      <td width="321" align="center" valign="top"><strong>De</strong></td>
      <td width="321" align="center" valign="top"><strong>Fecha</strong></td>
    </tr>
    <?php
    $i 
0;
    while(
$show mysql_fetch_assoc($res)) { 
    
mysql_free_result($res);?>
    <tr bgcolor="<?php if($show['leido'] == "si") { echo "#FFE8E8"; } else { if($i%2==0) { echo "#FFE7CE"; } else { echo "#FFCAB0"; } } ?>">
      <td align="center" valign="top"><?=$show['ID']?></td>
      <td align="center" valign="top"><a href="leer.php?id=<?=$show['ID']?>"><?=$show['asunto']?></a></td>
      <td align="center" valign="top"><?=$show['de']?></td>
      <td align="center" valign="top"><?=$show['fecha']?></td>
    </tr>
<?php $i++; 
}
?>
</table>
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a9500782/public_html/listar.php on line 24

Alguien me puede ayudar?