my code for show avatar but image not display . how to correct the code
<?php
require 'connect.php';
$userg = mysql_query("SELECT avatar FROM members")
or die("Failed to fetch your details.");
if (isset($_SESSION['MM_Username'])){
echo "Welcome ".$_SESSION['MM_Username'];
echo "<img src=";
echo $userg;
echo "></img>";
}
?>