<?php
$mysqli = new mysqli("localhost", "root", "", "WSAS");
if ($mysqli->connect_errno) {
    die("Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
}

return $mysqli; 