Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?php
  2. $con=pg_connect("host=sbazy dbname=s188580 user=s111111 password=x");
  3. $query="SELECT id_studenta, nazwisko, imie FROM _studenci
  4. ORDER BY nazwisko";
  5. $result=pg_exec($con, $query);
  6. $student1=pg_result($result,0,0);
  7. $student2=pg_result($result,1,0);
  8. $student3=pg_result($result,2,0);
  9. $student4=pg_result($result,3,0);
  10. $student5=pg_result($result,4,0);
  11. $student6=pg_result($result,5,0);
  12. print "Wybierz studenta, aby pobrac informacje na jego temat.<br>";
  13. echo "<form action=\"submit.php\" method=\"post\">
  14. <select name=\"nazwa_grupy\" size=\"4\">
  15. <option value=\"$student1\" />$student1<option value=\"$student2\" />$student2
  16. <option value=\"$student3\" />$student3<option value=\"$student4\" />$student4
  17. <option value=\"$student5\" />$student5<option value=\"$student6\" />$student6
  18. </select><br><input type=\"submit\" /></form>"
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement