Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-6'>
  5. <title>Szkola podstawowa</title>
  6. <link rel='stylesbeet' href='styl.css'/>
  7. </head>
  8. <body>
  9. <?php
  10. $con = mysqli_connect('localhost','root','','szkola');
  11. $db = mysqli_select_db($con,'szkola');
  12. ?>
  13.  
  14. <div id='baner'>
  15. <h1>oceny uczniow: biologia</h1>
  16. </div>
  17.  
  18.  
  19. <div id='lewy'>
  20. <h3> uczen:
  21. <?php
  22. $wynik =mysqli_query($con,'select imie,nazwisko from uczen where id=1');
  23. if(mysqli_num_raws($wynik) >0)
  24. {
  25. while($rsad = mysqli_fetch_assoc($wynik))
  26. {echo ' '.$rsad['imie'].' '.$rsad['nazwisko'];}
  27. }
  28. ?>
  29. </h3>
  30. <p> najwyzsza ocena z biologii:
  31. <?php
  32. $wynik=mysqli_query($con,'select max(ocena) from ocena where przedmiot_id =4 and uczen_id=1');
  33. if(mysqli_num_rows($wynik) >0)
  34. {
  35. while($rsad = mysqli_fetch_assoc($wynik))
  36. {echo ' '.$rsad['max(ocena)'];}
  37. }
  38. ?>
  39. </p>
  40. </div>
  41.  
  42. <div id="prawy">
  43. <h3>nazwsika i numery pesel uczniow: </h3>
  44. <?php
  45. $wynik=mysqli_query($con,'select nazwisko,pesel from uczen');
  46. if(mysqli_num_rows($wynik) >0)
  47. {echo '<ul>';
  48. while($rsad = mysqli_fetch_assoc($wynik))
  49. {echo '<li>'.$rsad['nazwisko'].' '.$rsad['pesel'].'</li>';}
  50. echo '<ul>';
  51. }
  52. $con -> close();
  53. ?>
  54. </div>
  55.  
  56. <div id='stopka'>
  57. <h2> szkola podstawowa </h2>
  58. <p> strone opracowal: Mikołaj Sachowicz Wołek</p>
  59. </div>
  60.  
  61.  
  62. </body>
  63. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement