Created
March 3, 2014 19:07
-
-
Save romeo1/9332310 to your computer and use it in GitHub Desktop.
Untuk Koneksi nya buat folder koneksi dan simpan dengan nama koneksi.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $mysql_user="root"; | |
| $mysql_password="root"; | |
| $mysql_database="dbuniversitas"; | |
| $mysql_host="localhost"; | |
| //---[KONEKSI KE DATABASE]---// | |
| $koneksi=mysql_connect($mysql_host,$mysql_user,$mysql_password); | |
| if (!$koneksi){ | |
| die('koneksi gagal :' .mysql_error()); | |
| } | |
| //===[ PILIH DATABASE YANG AKAN DIGUNAKAN ]=====// | |
| mysql_select_db($mysql_database); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment