Advertisement
Guest User

Untitled

a guest
Jan 24th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. $username="root";
  4.  
  5. $password="";
  6.  
  7. $database="frimaos";
  8.  
  9. mysql_connect('localhost',$username,$password);
  10.  
  11. @mysql_select_db($database) or die("Nie odnaleziono bazy danych");
  12.  
  13. $query="SELECT * FROM `pracownicy`";
  14.  
  15. $result=mysql_query($query);
  16.  
  17. $num=mysql_numrows($result);
  18.  
  19. mysql_close();
  20.  
  21. $i=0;
  22.  
  23. while ($i < $num) {
  24.  
  25. echo mysql_result($result,$i,"id_p");
  26. echo mysql_result($result,$i,"nazwisko");
  27. echo mysql_result($result,$i,"imie");
  28. echo mysql_result($result,$i,"pesel");
  29. echo mysql_result($result,$i,"stanowisko");
  30. echo "<br>";
  31.  
  32.  
  33.  
  34. $i++;
  35.  
  36. }
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement