Skip to content

Instantly share code, notes, and snippets.

@ombak
Last active May 29, 2020 15:14
Show Gist options
  • Save ombak/cf2d6e124d1e9322d5ffd221b2fd8a24 to your computer and use it in GitHub Desktop.
Save ombak/cf2d6e124d1e9322d5ffd221b2fd8a24 to your computer and use it in GitHub Desktop.
<?php
//...kosongkan parameter password bila tidak ada password
$conn = mysql_connect("localhost", "root", "");
//...bila koneksi gagal
if(!$conn) {
die("koneksi gagal, periksa lagi parameter.");
} else {
echo "koneksi berhasil.";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment