Advertisement
Guest User

Untitled

a guest
Apr 12th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. //Connection variables
  4. $host = "localhost"; //MySQL host name eg. localhost
  5. $user = "mysliwi"; //MySQL uder. eg. root (if your on localserver)
  6. $password = "mysliwi"; //MySQL user password (if password is not set for your root user then keep it empty)
  7. $database = "mysliwi"; //MySQL Database name
  8.  
  9. //Connect to MySQL Database
  10. $con = new mysqli($host, $user, $password, $database);
  11.  
  12. //Check connection
  13. if ($con->connect_error) {
  14. die("Connection failed: " . $con->connect_error);
  15. }
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement