Advertisement
Guest User

Koneksi Database

a guest
Jan 20th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2. $host='localhost';
  3. $username='root';
  4. $pass='170392';
  5. $dbname='belajar_ci';
  6. mysql_connect($host,$username,$pass);
  7.  
  8. $database=mysql_select_db($dbname);
  9. if ($database) {
  10.     echo 'koneksi berhasil';
  11.     }
  12.     else
  13.     {
  14.     echo 'koneksi gagal';
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement