Advertisement
Guest User

conn.php

a guest
Feb 5th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2. $host = "localhost";
  3. $user = "isi dengan user";
  4. $pass = "isi dengan password";
  5. $dbnm = "nama db";
  6.  
  7.  
  8. //  Create a new connection to the MySQL database using PDO
  9. $conn = new mysqli($host, $user, $pass);
  10.  
  11. // Check connection
  12. if ($conn->connect_error) {
  13.     die("Connection failed: " . $conn->connect_error);
  14. }
  15. echo "Connected successfully";
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement