Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $serverName="localhost";
- $userName="root";
- $password="";
- $dbName="poradnia";
- $conn=mysqli_connect($serverName,$userName,$password,$dbName);
- if (!$conn){
- die("blad polaczenia".mysqli_connect_error());
- }
- $sql="select id,imie,nazwisko,choroba from pacjenci;";
- $wynik=mysqli_query($conn,$sql);
- if(!$wynik){
- die("vlad zapisywania".mysqli_error($conn));
- }
- if (mysqli_num_rows($wynik)>0){
- while ($row=mysqli_fetch_assoc($wynik)){
- echo $row["id"]." ".$row["imie"]." ".$row["nazwisko"]." ".$row["choroba"]."<br>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement