Ver Mensaje Individual
  #5 (permalink)  
Antiguo 07/07/2011, 14:58
Avatar de skiper0125
skiper0125
 
Fecha de Ingreso: octubre-2010
Ubicación: $this->Mexico('Toluca');
Mensajes: 1.127
Antigüedad: 13 años, 6 meses
Puntos: 511
Respuesta: PHP listar columna y pasar datos a otra pagina

Prueba con esto


Código PHP:
Ver original
  1. <html>
  2. <body>
  3. <?php
  4. $link=mysql_connect("tu_servidor","tu_usuario","tu_contrasenia") or die (mysql_error());
  5. mysql_select_db("tu_base",$link) or die (mysql_error());
  6. $sql = mysql_query("SELECT * FROM agenda") or die ("Error en el query: ".mysql_error());
  7. ?>
  8. <html>
  9. <head>
  10. <title>Pruebas</title>
  11. </head>
  12. <body>
  13.  
  14. <table>
  15. <?php
  16. echo "<table>";
  17. while($rs=mysql_fetch_array($sql)){
  18.     echo "<tr>";
  19.     echo "<td><a href='guardasesion.php?id={$rs['id']}>{$rs['id']}</a></td>";
  20.     echo "</tr>";
  21. }
  22. echo "</table>";
  23. ?>
  24. </body>
  25. </html>

Saludos
__________________
Recuerda que estamos aquí para orientarte, y no para hacer tu trabajo.
Si mi aporte fue de ayuda, recuerda que agradecer no cuesta nada +1

Skiper0125