Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username="root";
- $password="";
- $database="frimaos";
- mysql_connect('localhost',$username,$password);
- @mysql_select_db($database) or die("Nie odnaleziono bazy danych");
- $query="SELECT * FROM `pracownicy`";
- $result=mysql_query($query);
- $num=mysql_numrows($result);
- mysql_close();
- $i=0;
- echo "<table border='1'>";
- echo "<tr style='font-weight:bold;'>";
- echo "<td>ID</td>";
- echo "<td>Nazwisko</td>";
- echo "<td>Imie</td>";
- echo "<td>Pesel</td>";
- echo "<td>Stanowisko</td>";
- echo "</tr>";
- while ($i < $num) {
- echo "<tr>";
- echo "<td>".mysql_result($result,$i,"id_p")."</td>";
- echo "<td>".mysql_result($result,$i,"nazwisko")."</td>";
- echo "<td>".mysql_result($result,$i,"imie")."</td>";
- echo "<td>".mysql_result($result,$i,"pesel")."</td>";
- echo "<td>".mysql_result($result,$i,"stanowisko")."</td>";
- echo "</tr>";
- echo "<br>";
- $i++;
- }
- echo "</table>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement