Advertisement
Hiporion

Untitled

Mar 2nd, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2.  
  3. /* *
  4. * Author: @Leandro Martins
  5. * Version: 0.1
  6. * */
  7.  
  8. require_once dirname(__FILE__) . '/ControleLogin.php';
  9.  
  10.  
  11. ?>
  12. <!DOCTYPE html>
  13.  
  14. <html lang="pt-br">
  15.  
  16. <meta charset="utf-8">
  17.  
  18. <head>
  19.  
  20. </head>
  21.  
  22. <body>
  23. <form name= "form2" method="get" action="listar.php">
  24. <table>
  25. <tr>
  26. <td>Nome do Item</td>
  27. </tr>
  28.  
  29. <tr>
  30. <td method="get">
  31.  
  32. <?php
  33. $logado = usuarioLogado();
  34.  
  35. if(!$logado){
  36. usuarioResetar();
  37. }else{
  38. $result = mysqli_query($con, "SELECT * FROM item");
  39. echo ("<table>");
  40.  
  41.  
  42. while ($row = mysqli_fetch_array($result, MYSQLI_BOTH)) {
  43. //echo ("$row");
  44. echo ("<tr>");
  45. $tamanho = mysqli_affected_rows($con);
  46. //
  47. for ($contador = 0; $tamanho >= $contador; $contador++) {
  48. echo ("<td>");
  49. echo $row["$contador"];
  50. echo ("</td>");
  51. }
  52. echo ("</tr>");
  53. }
  54. }
  55. ?>
  56. </td>
  57. </tr>
  58. </table>
  59. </body>
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement