SHARE
TWEET

pidvbpibpvasnpv[;idbpivbspispbvsdbv;

a guest Oct 21st, 2019 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $username = 'root';
  4. $password = '';
  5. $db = 'test';
  6.  
  7. $conn = new mysqli ('localhost',$username, $password, $db) or die("unable to connect");
  8.  
  9. $query="insert into pracownicy (dzial,idprac,Nazwisko,Placa,zespol) values ('IT','15','czlowiek','50000000','Helpdesk')";
  10. if($query)
  11.     echo 'data inserted<br>';
  12. $result = mysqli_query($conn, "SELECT * FROM `pracownicy`");
  13.  
  14. // using while loop to dispaly data from database
  15. while($row = mysqli_fetch_array($result))
  16.   {
  17.  
  18.     echo "$row[0] - $row[1] - $row[2] - $row[3] - $row[4]<br>";
  19.  
  20.   }
  21.  
  22. // free your result
  23.   mysqli_free_result($result);
  24.  
  25.   mysqli_close($conn);
  26.  
  27. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top