Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <?php
  2.  
  3. $hostname = "localhost";
  4. $username = "root";
  5. $password = "";
  6. $dbname = "myfirstdb";
  7.  
  8. //Δημιουργία της σύνδεσης
  9. $conn = new mysqli($hostname , $username, $password, $dbname);
  10.  
  11. //Έλεγχος της σύνδεσης
  12. if ($conn->connect_error)
  13. {
  14. die("Connection failed: " . $conn->connect_error);
  15. }
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement