Created
October 5, 2020 01:27
-
-
Save ahanafi/26784e700cad655bc2369dcfe9e7edd6 to your computer and use it in GitHub Desktop.
Koneksi PHP dan MySQL
This file contains 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 | |
$hostname = "localhost"; | |
$username = "root"; | |
$password = "secret-password"; | |
$dbname = "my_database"; | |
//Koneksi dengan fungsi mysql_connect | |
$connect = mysql_connect($hostname, $username, $password); | |
mysql_select_db($dbname, $connect); | |
//Koneksi dengan fungsi mysqli_connect | |
$connect = mysqli_connect($hostname, $username, $password, $dbname); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment