please can you help me for define image size and width on this 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 mysql_result($userg,0,"avatar" );
echo "></img>";
 
}
?>
<?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=".mysql_result($userg,0,"avatar" )." width=200 height=200>";
     	}
    ?>

Use the following script

<?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'];
?>

<img src="<?php echo mysql_result($userg,0,"avatar" ); ?>" width="50%" height="50%">


<?php
    
     
    }
    ?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.