<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$dbname = 'laundry_app';

function getDBConnection(){
    global $host, $user, $pass, $dbname;
    $conn = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    return $conn;
}
?>