Advertisement
Guest User

Untitled

a guest
Dec 9th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Salon pielęgnacji</title>
  6. <link rel="stylesheet" type="text/css" href="css/salon.css">
  7. </head>
  8. <body>
  9. <header>
  10. <h1>SALON PIELĘGNACJI PSÓW I KOTÓW</h1>
  11. </header>
  12. <?php
  13.  
  14. $connect=mysqli_connect("localhost","root","","salon");
  15. ?>
  16. <section id="lewa">
  17. <h3>SALON ZAPRASZA W DNIACH</h3>
  18. <ul>
  19. <li>Poniedziałek, 12:00 - 18:00</li>
  20. <li>Wtorek, 12:00 - 18:00</li>
  21. </ul>
  22. <a href="pies.jpg"><img src="pies-mini.jpg" alt="mini-pies"/></a>
  23.  
  24. <p>Umów się telefonicznie na wizytę lub po prostu przyjdź!</p>
  25. </section>
  26.  
  27. <section id="prawa">
  28. <h3>USŁUGI</h3>
  29. <?php
  30. $sql2=mysqli_query($connect,"SELECT nazwa, cena FROM uslugi");
  31.  
  32. if (mysqli_num_rows($sql2)>0) {
  33. while($wiersz2=mysqli_fetch_assoc($sql2)) {
  34. echo $wiersz2['nazwa'] . ": " . $wiersz2['cena'];
  35. echo "<br>";
  36. }
  37. }
  38.  
  39.  
  40.  
  41.  
  42. ?>
  43. </section>
  44.  
  45. <section id="srodek">
  46. <h3>PRZYPOMNIENIE O NASTĘPNEJ WIZYCIE</h3>
  47. <?php
  48. $sql1=mysqli_query($connect,"SELECT imie,rodzaj,nastepna_wizyta,telefon from zwierzeta where nastepna_wizyta !=0");
  49.  
  50. if(mysqli_num_rows($sql1)>0) {
  51. while($wiersz=mysqli_fetch_assoc($sql1)) {
  52. if ($wiersz['rodzaj']==1) {
  53. echo "pies: " . $wiersz['imie'];
  54. echo "<br>";
  55. }
  56. if ($wiersz['rodzaj']==2) {
  57. echo "kot: " . $wiersz['imie'];
  58. echo "<br>";
  59. }
  60. echo "Data następnej wizyty:" . $wiersz['nastepna_wizyta'] . "," . " telefon właściciela: " . $wiersz['telefon'];
  61. echo "<br>";
  62. }
  63. }
  64. mysqli_close($connect);
  65.  
  66. ?>
  67. </section>
  68.  
  69.  
  70.  
  71.  
  72. </body>
  73. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement