<?php
require("includes/dbconnect.php");

$project_title = 'FAVOURITE';
$project_name  = 'FAVOURITE';

$zheadroot = $_SESSION['zheadroot'] = "apps2ai_favourite_root";


$redirect = explode('.', $_SERVER['HTTP_HOST'])[0];
//echo $redirect;
$getdbname = mysqli_query($conn, "SELECT `dbroot` FROM $zheadroot.`usermain` WHERE `redirect`='$redirect'") or die(mysqli_error($conn));
$fdbname = mysqli_fetch_array($getdbname);

$dbname = $fdbname['dbroot'];
$_SESSION["zdbroot"] = $dbname;
$_SESSION["zdir"] = $dbname;
$_SESSION["redirect"] = $redirect;
$zsuperflag = '';
?>