Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $user = "root";
- $password = "";
- $db = "php";
- $koneksi=@mysql_connect($host,$user,$password);
- if(!$koneksi){
- echo "Gagal melakukan koneksi <br/>:".mysql_error();
- exit();
- }
- $pilihdb=@mysql_select_db($db,$koneksi);
- if(!$pilihdb){
- exit ("Gagal melakukan hubungan dengan database<br> Kesalahan :".mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement