Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="pl">
  3. <head>
  4. <meta charset="utf-8">
  5. <title> Dziennik Elektroniczny </title>
  6. <meta http-equiv="X-Ua-Compatible" content="IE=edge,chrome=1">
  7. </head>
  8. <body>
  9.  
  10.  
  11. <select name="klasa">
  12. <option value="a">1A</option>
  13. <option value="b">2A</option>
  14. <option value="c">3A</option>
  15. </select><br>
  16. <input type="submit" value="Wyświetl" name="p">
  17.  
  18.  
  19.  
  20.  
  21. <?php
  22.  
  23. if (isset($_POST['klasa']))
  24. {
  25. require_once "dbconnect.php";
  26.  
  27. $conn = mysqli_connect($host,$user,$pass,$db) or die ("Błąd połączenia");
  28. $conn->set_charset("utf8");
  29.  
  30. $klasa = $_POST['klasa'];
  31.  
  32.  
  33. $q="SELECT ime,nazwisko FROM uczniowie WHERE id_klasy='2'";
  34. $result = mysqli_query($conn, $q);
  35.  
  36. echo
  37. }
  38.  
  39. ?>
  40. </body>
  41.  
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement