rambo189619

Visualizar.php

May 11th, 2012
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Visualizar</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <?php
  11. $conexion=mysql_connect("127.0.0.1","root","") or die("Error en acceder a la conexion.");
  12.  
  13. mysql_select_db("curso_php",$conexion) or die("Error al acceder a la base de datos");
  14.  
  15. $registros=mysql_query("select * from Textos")or die("Error al sacar informacion");
  16.  
  17. while($reg=mysql_fetch_array($registros)){
  18.     echo$reg['Id']." ".$reg['Texto']."<br>";   
  19. }
  20.  
  21. ?>
  22.  
  23.  
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment