Advertisement
Guest User

Untitled

a guest
Jun 7th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5.  
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  8. <title>Dom wczasowy</title>
  9. <link rel="Stylesheet" type="text/css" href="style.css"/>
  10. <style type="text/css">
  11. h1 {
  12. color: white;
  13. margin:0;
  14. padding:0;
  15. font-size: 65px;
  16. font-weight:normal;
  17.  
  18. }
  19. body {
  20. background-image: url(dom.jpg);
  21. width: 100%;
  22. height: 100%;
  23. overflow:hidden;
  24. background-attachment: scroll;
  25. width: 100%;
  26. height: 100%;
  27. left: 0px;
  28. top: 0px;
  29. position: absolute;
  30. z-index: 0;
  31. background-size:100%;}
  32. td{
  33. color: #000000;
  34. font-weight: bolder;
  35. border: 3px solid white;
  36. border-collapse: collapse;
  37. background-color: #fff9fb;
  38. padding: 5px;
  39. }
  40.  
  41. </style>
  42.  
  43.  
  44.  
  45.  
  46.  
  47. </head>
  48. <body>
  49.  
  50.  
  51. </div>
  52.  
  53. <h1><font color="white">Tabela klienci</font></h1>
  54.  
  55.  
  56. <?php
  57. $servername = "localhost";
  58. $username = "root";
  59. $password = "";
  60. $dbname = "db_name";
  61.  
  62. // Create connection
  63. $conn = new mysqli($servername, $username, $password, $dbname);
  64. // Check connection
  65. if ($conn->connect_error) {
  66. die("Connection failed: " . $conn->connect_error);
  67. }
  68.  
  69. $sql = "SELECT id_klienta, imie, nazwisko, telefon, E_mail FROM klienci where imie='". $_POST['imie']. "' AND nazwisko='". _POST['nazwisko'].";";
  70.  
  71. ?>
  72. <table border="2"align="center">
  73. <thead>
  74. <tr>
  75. <th><font color="white">ID Klienta</font></th>
  76. <th><font color="white">Imie</font></th>
  77. <th><font color="white">Nazwisko</font></th>
  78. <th><font color="white">Telefon</font></th>
  79. <th><font color="white">E-Mail</font></th>
  80.  
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <?php
  85. $result = $conn->query($sql);
  86.  
  87. if ($result->num_rows == 0) {
  88.  
  89. echo '<tr><td colspan="4">No Rows Returned</td></tr>';}
  90. else {
  91. $row = $result->fetch_assoc();
  92. // echo "<tr><td>{$row['id_klienta']}</td><td>{$row['imie']}</td><td>{$row['nazwisko']}</td><td>{$row['telefon']}</td><td>{$row['E_mail']}</td></tr>\n";
  93.  
  94.  
  95. echo "id: " .$row['id_klienta'];
  96. echo "imie: " .$row['imie'];
  97. echo "nazwisko: " .$row['nazwisko'];
  98. echo "telefon: " .$row['telefon'];
  99. echo "E-mail: " .$row['E_mail'];
  100.  
  101. }
  102.  
  103. $conn->close();
  104. ?>
  105. </tbody>
  106. </table>
  107. <div style="position: absolute; bottom: 0px; font-size: 22px;"><font color="white">Copyright Marcin Hus DJ_NIEM 2016 ®</div></font>
  108. </body>
  109. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement