Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/05/2011, 16:54
tonopxc
 
Fecha de Ingreso: mayo-2011
Mensajes: 10
Antigüedad: 13 años, 10 meses
Puntos: 0
mostrar columna designada para cada usuario ...

ESTA SECUENCIA ME MUESTRA TODA LA TABLA... Y YO NESESITO KE MUESTRE SOLO LA COLUMNA DE DICHO USUARIO LOGIADO...
NO CAXO KE CAMBIAR AHII... CUANDO LA SOLICITA...
Código PHP:


<html>
<body>
<?php

/* Abrimos la base de datos */
  
$conx mysql_connect ("localhost","root","password");
  if (!
$conx) die ("Error al abrir la base <br/>"mysql_error());
  
mysql_select_db("usuarios") OR die("Connection Error to Database");   

/* Realizamos la consulta SQL */
$sql="select * from usuarios";
$resultmysql_query($sql) or die(mysql_error());
if(
mysql_num_rows($result)==0) die("No hay registros para mostrar");

/* Desplegamos cada uno de los registros dentro de una tabla */ 
echo "<table border=1 cellpadding=4 cellspacing=0>";

/*Priemro los encabezados*/
 
echo "<tr>
         <th colspan=5> Agenda personal </th>
       <tr>
         <th> ID </th><th> usuario </th><th> password </th>
         <th> email </th><th> Fecha de N. </th>
      </tr>"
;

/*Y ahora todos los registros */
while($row=mysql_fetch_array($result))
{
 echo 
"<tr>
         <td align='right'> $row[id] </td>
         <td> $row[usuario] </td>
         <td> $row[password] </td>
         <td> $row[email] </td>
         <td> $row[fecha] </td>
      </tr>"
;
}
echo 
"</table>";

?>
</body>
</html>