Getting data from databse server does not work : I am a beginner and i would need a little bit of help: I have created this php code to get the user information from the "profiles"-table from my Database(note: the variable $username is already defined):

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <?php

    //getting the data from the Database

    $aVar = mysqli_connect('localhost','root','','socialnetwork');
    $usernameaccount = mysqli_query($aVar, "SELECT username FROM users WHERE username = '$username'");

    $age = mysqli_query($aVar, "SELECT p.age FROM profiles p, users u WHERE u.username = '$username' AND u.id = p.id");

    $gender = mysqli_query($aVar, "SELECT p.gender FROM profiles p, users u WHERE u.username = '$username' AND u.id = p.id");

    $description = mysqli_query($aVar, "SELECT p.description FROM profiles p, users u WHERE u.username = '$username' AND u.id = p.id");

    //after getting the data i insert them into a variable with some html code:

    $outputusername = '<h2>'.$usernameaccount.'<hr></h2>';
    $outputage = '<h2>'.$age.'<hr></h2>';
    $outputgender = '<h2>'.$gender.'<hr></h2>';
    $outputdescription = '<h2>'.$description.'<hr></h2>';

    ?>

<!-- end snippet -->

And than somewhere in the html code i echo them like this:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

         <div class="info">
         	<?php
             echo $outputusername;
             echo $outputage;
             echo $outputgender;
             echo $outputdescription;
             ?>
         </div>

<!-- end snippet -->

Somehow it gives me the error message: 
Recoverable fatal error: Object of class mysqli_result could not be converted to string in C:\xampp\htdocs\ping.com\profile.php on line 10

Can someone please help me to get these datas from my database in the **correct** way and display them in the html-code? If you need any mor information please just ask(Sorry for my bad englisch:/).

 