Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $dbServer = 'localhost';
  5. $dbUser = 'root';
  6. $dbPassword = '';
  7. $dbName = 'klient';
  8.  
  9. $connection = new mysqli($dbServer, $dbUser, $dbPassword, $dbName);
  10.  
  11. $sql = " INSERT INTO users(
  12. username, email) VALUES
  13. ('jan', 'jan@gmail.com'),
  14. ('janusz', 'janusz@gmail.com'),
  15. ('krzys', 'krzys@gmail.com')
  16. ;";
  17.  
  18. if($connection ->query($sql) === TRUE){
  19. echo "dodano userów";
  20. }
  21.  
  22. else { echo "nie udało się".$connection->error ;
  23. }
  24. $connection->close();
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement