Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "haslo.php";
- $con=pg_connect("host=sbazy user=s187311 dbname=s187311 password=$h");
- $grupy="select nr_grupy from grupy";
- $r=pg_exec($con,$grupy);
- wyswietl_grupy($r);
- function wyswietl_grupy($r){
- $liczba_wierszy=pg_num_rows($r);
- print"Uzupelnij, aby dodac studenta:<br><br>";
- print("Podaj nazwisko: <input type='text' name='nazwisko' size='30' maxlength='50' value='$_POST[nazwisko]'/><br>");
- print("Podaj imie: <input type='text' name='imie' size='30' maxlength='50' value='$_POST[imie]'/><br>");
- print("Wprowadz datę urodzenia w formacie(rrrr-mm-dd): <input type='text' name='data' size='30' maxlength='50' value='$_POST[data_urodzenia]'/><br>");
- print"Wybierz grupę:";
- print"<select name='grupy' size='5'>";
- for ($i=0; $i<$liczba_wierszy; $i++){
- $nr_grupy=pg_result($r,$i,0);
- print("<option value='$nr_grupy'/>nr_grupy:$nr_grupy");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement