Advertisement
Guest User

koneksi.php

a guest
May 9th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="root";
  4. $name="login";
  5. $pass="";
  6. $conn=mysql_connect($host,$user,$pass);
  7.  
  8. if ($conn) {
  9. $buka=mysql_select_db ($name);
  10. if(!$buka) {
  11. die ("Database tidak dapat dibuka");
  12. }
  13. }
  14. else {
  15. die ("Server MYSQL tidak terhubung");
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement