Advertisement
dhiforester

connection.php

Mar 30th, 2021
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.     $servername = "localhost";
  3.     $username = "root";
  4.     $password = "";
  5.     $db = "simrs";
  6.  
  7.     //Buat Koneksi
  8.     $conn = new mysqli($servername, $username, $password, $db);
  9.  
  10.     //Cek Koneksi Jika Error
  11.     if ($conn->connect_error) {
  12.         die("Connection failed: " . $conn->connect_error);
  13.     }else{
  14.         echo "Koneksi Berhasil";
  15.     }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement