<?php function set_mysql ($db) { $url = 'localhost'; $user = 'root'; $pass = ''; return new mysqli ($url, $user, $pass, $db); }