Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <?php
  2.  
  3. include('conexion.php');
  4.  
  5. $sql="SELECT * FROM tics";
  6.  
  7. $resul=$link->query($sql);
  8.  
  9. ?>
  10.  
  11. <?php while($fila=$resul->fetch_assoc()):
  12.  
  13.  
  14. $t=$fila['tit'];
  15. $c=$fila['con'];
  16.  
  17.  
  18. ?>
  19.  
  20. <?php
  21.  
  22.  
  23. $contenido = "<html> <body class'hola5'> <h1> $t </h1> <p> $c
  24. </p> </body> </html>";
  25.  
  26.  
  27. $fp = fopen('new.php', 'w');
  28. fwrite($fp, $contenido);
  29.  
  30. //parte que intente crear una nueva pagina, funciona solo con
  31. el ultimo registro //
  32.  
  33. ?>
  34.  
  35. //parte html que si me funciona generando cada registro en su
  36. respectiva etiqueta//
  37.  
  38. <div class="card-body">
  39. <a href="new.php"> <h2 class="card-title"> <?= $t;?> </h2> <p>
  40. <?= $c; ?> </p> </a>
  41. <div class="card-footer text-muted">
  42. Posted on January 1, 2017 by
  43. <a href="#">Start Bootstrap</a>
  44. </div>
  45. </div>
  46.  
  47.  
  48.  
  49. <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement