Isn't displaying information which I select from database in mysql php

Keywords´╝Ü php mysql

Question: 

Hello i am trying to find out what the value is in the database (this is like a level system and depending on the level in the database then decides if you have access to the page) so what i am trying to do is get the variable in the database and then in php if the level is a certain level then give access.

at first as i am learning php and mysql is just to do a simple statement on get the information from database where the username column is equal to root and then echo out what the level is.

if you need any other information from another file then just let me know.

I have tried changing the database from another php file I have also tried changing the WHERE username === 'root' to the variable $username so it looks like where username === $username. I have changed the operators from === to == and =

<?php
// require_once 'dbconfig.php';
require "../login/loginheader.php"; 

$link = mysqli_connect("localhost", "root", "", "452");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$username = $_SESSION['username'];
$result = mysqli_query($link,"SELECT level FROM members WHERE username === 'root' " );
echo $result;

?>

there is no error message that appears literally.

Answers: