Advertisement
Guest User

Untitled

a guest
Nov 5th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" type="text/css" href="weterynarz.css">
  6. <title>weterynarz</title>
  7. </head>
  8. <body>
  9. <header>
  10. <h1>GABINET WETERYNARYJNY</h1>
  11. </header>
  12. <div id="lewy">
  13. <h2>PSY</h2>
  14. <p id="wynik1"></p>
  15. <h2>KOTY</h2>
  16. <p id="wynik2"></p>
  17. </div>
  18. <div id="srodkowy">
  19. <h2>SZCZEGÓŁOWA INFORMACJA O ZWIERZĘTACH</h2>
  20. <p id="wynik3"></p>
  21. </div>
  22. <div id="prawy">
  23. <h2>WETERYNARZ</h2>
  24. <a href="logo.png"><img src="logo.png"></a>
  25. <p>Krzysztof Nowakowski, lekarz weterynarii</p>
  26. <h2>GODZINY PRZYJĘĆ</h2>
  27. <table>
  28. <tr><td>Poniedziałek</td><td>15:00 - 19:00</td></tr>
  29. <tr><td>Wtorek</td><td>15:00 - 19:00</td></tr>
  30. </table>
  31. </div>
  32. <?php
  33. $host="localhost";
  34. $user="root";
  35. $pass="";
  36. $db="weterynarz";
  37.  
  38. $conn=mysqli_connect($host,$user,$pass,$db);
  39. if(!$conn)
  40. {
  41. die;
  42. }
  43.  
  44. $sql="SELECT id, imie, wlasciciel from zwierzeta where rodzaj=1";
  45. $wynik=mysqli_query($conn,$sql);
  46. if(!$wynik)
  47. {
  48. echo 'blad zapytania 1';
  49. die;
  50. }
  51. if(mysqli_num_rows($wynik)<0)
  52. {
  53. echo 'nie ma wynikow do wyswietlenia';
  54. die;
  55. }
  56. while($wiersz=mysqli_fetch_assoc($wynik))
  57. {
  58.  
  59. }
  60.  
  61.  
  62.  
  63. mysqli_close($conn);
  64. ?>
  65. </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement