<?php
    try {
        $host = "localhost";
        $username = "sujono";
        $password = "12345678";
        $dbname = "sensorwater";
 
        $PDO = new PDO("mysql:host=" . $host . ";dbname=" . $dbname . ";charset=utf8", $username, $password);
    } catch (PDOException $erro) {
        echo "Gagal Terhubung ke database : " . $ero->getMessage();
    }

    $conn = mysqli_connect($host, $username, $password, $dbname);		
    if (!$conn){
        die("Connection Failed:".mysqli_connect_error());    
        }
 
?>