I am really new in php. Here is my code:
$domain = $_SERVER['HTTP_HOST'];
$uri = parse_url($_SERVER['HTTP_HOST']);
$r_domain = substr(['host'], strpos($uri['host'],"."), strlen($uri['host']));
if ( $domain == $r_domain ) {
/*Open the connection to our database use the info from the config file.*/
$link = f_sqlConnect('root', '', 'group_project');