Advertisement
diablo878

Untitled

Apr 29th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. Na ekranie pojawia się formularz zawierający posortowaną listę wszystkich studentów (co najmniej identyfikator, nazwisko i imię):
  2. <br>
  3. <form method='post' action='pomocnicze.php'>
  4. <?php
  5. $con=pgconnect("host=test user=test dbname=test password=test");
  6. $query="SELECT idstudenta, nazwisko, imie FROM studenci ORDER BY nazwisko DESC";
  7.  
  8. $result=pg_query($con, $query);
  9.  
  10. while ($studenci= pgfetchrow($result)) {
  11. print("<input type=radio name='wybor' value='".$studenci['idstudenta']."' />ID: ".$studenci['idstudenta']." | Imie: ".$studenci['imie']." | Nazwisko: ".$studenci['nazwisko']."</BR>");
  12. }
  13. ?>
  14. <br>
  15. <input type="submit" value="wybierz">
  16. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement