List.php
Código PHP:
<?php
include("conexion.php");
$username = $_COOKIE['loggedin'];
$sql= mysql_query("SELECT * FROM mensajes WHERE para = '$username' ORDER by msgid DESC");
while ($row = mysql_fetch_array($sql) ){
$asunte = $row[asunto];
$resto = substr("$asunte", 0, 40);
$aydi = $row[msgid];
echo "
<center>".$row["de"]."</center></td>
<a href=leer_privados2.php?id=".$row[msgid]."><font color=white><u>$resto..</u></a></td>
<font color=white>".$row["fecha"]."</td></tr><br>";
}
echo "</table><br><table width=340 align=center cellspacing=2 cellpadding=2>
<a href='http://stormofsighs.mywebcommunity.org/sistema/list.php'><img src='objetos/send.png'></a>";
?>
Código HTML:
<?php $username = $_COOKIE['loggedin']; ?> <script languaje="Javascript"> <!-- function Smile(texto){ document.form.mensaje.value = document.form.mensaje.value + texto; } // --> </script> <form method="post" name="form" action="enviar_privados2.php"> <input type=hidden name=de value=<? echo $username; ?>> <table align=center bgcolor=black width=350 cellspacing=1 cellpadding=3> <tr> <td bgcolor=#c4dBFB width="55"><font size="2"><b><font face="Verdana">De:</font></b></font></td> <td bgcolor=#e8edf2 width="268"><? echo "<font face=Tahoma size=2> <b>$username</b> - $REMOTE_ADDR"; ?></td> </tr> <tr> <td bgcolor=#E6EBFB width="55"><font face=Tahoma size=2><b>Para:</b></font></td> <td bgcolor=#e8edf2 width="268"> <input type=text name=para style="Font-size= 8pt; Font-Face=Tahoma" size="24"> </td> </tr>