APLIKASI PERPUSTAKAAN DENGAN BOOTSTRAP 5, PHP DAN MYSQL
koneksi.php <?php $db = mysqli_connect("localhost","root","","perpus"); function query($query){ global $db; $result = mysqli_query($db, $query); $rows = []; while ($row = mysqli_fetch_assoc($result)) { $rows[] = $row; } return $rows; } function register($nis,$nama,$password){ global $db; $result = mysqli_query($db, "select nis from user where nis = '$nis'"); if (mysqli_fetch_assoc($result)) { echo "<script> alert('NIS sudah terdaftar!') </script>"; return false; } $sql = mysqli_query($db,"insert into user value('$nis','$nama','$password')"); return $sql; } function login($nis,$password){ global $db; $sql = mysqli_query($db, "selec...