Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/12/2009, 22:06
Avatar de urgido
urgido
 
Fecha de Ingreso: febrero-2005
Mensajes: 2.351
Antigüedad: 19 años, 6 meses
Puntos: 25
Respuesta: Obtener el nombre de usuario

Código PHP:
Ver original
  1. <?php  
  2. include("conexion.php");
  3. $username = $_COOKIE['loggedin'];
  4. $sql= mysql_query("SELECT * FROM mensajes WHERE para = '$username' ORDER by msgid DESC");
  5.  
  6. while ($row = mysql_fetch_array($sql) ){
  7.  
  8. $asunte = $row[asunto];
  9. $resto = substr("$asunte", 0, 40);
  10. $aydi = $row[msgid];
  11.  
  12. echo "  
  13. <center>".$row["de"]."</center></td>
  14. <a href=leer_privados2.php?id=".$row[msgid]."><font color=white><u>$resto..</u></a></td>
  15. <font color=white>".$row["fecha"]."</td></tr><br>";
  16.  
  17. echo "</table><br><table width=340 align=center cellspacing=2 cellpadding=2>
  18. <a href='http://stormofsighs.mywebcommunity.org/sistema/list.php?p=".$row[para]."'><img src='objetos/send.png'></a>";
  19.  
  20. }
  21. ?>

Código PHP:
Ver original
  1. <?php
  2. $username = $_COOKIE['loggedin'];
  3. $para=$_GET['p'];
  4. ?>
  5. <script languaje="Javascript">
  6. <!--
  7. function Smile(texto){
  8.  document.form.mensaje.value = document.form.mensaje.value + texto;
  9. }
  10. // -->
  11. </script>
  12. <form method="post" name="form" action="enviar_privados2.php">
  13. <input type=hidden name=de value=<? echo $username; ?>>
  14.   <table align=center bgcolor=black width=350 cellspacing=1 cellpadding=3>
  15.     <tr>
  16.       <td bgcolor=#c4dBFB width="55"><font size="2"><b><font face="Verdana">De:</font></b></font></td>
  17.       <td bgcolor=#e8edf2 width="268"><? echo "<font face=Tahoma size=2> <b>$username</b> - $REMOTE_ADDR"; ?></td>
  18.     </tr>
  19.     <tr>
  20.       <td bgcolor=#E6EBFB width="55"><font face=Tahoma size=2><b>Para: <?php echo $para; ?></b></font></td>
  21.       <td bgcolor=#e8edf2 width="268">
  22.         <input type=text name=para style="Font-size= 8pt; Font-Face=Tahoma" size="24">
  23.         </td>
  24.     </tr>
__________________
Hospedaje Web al mejor costo!