0

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>";
 
}
?>
3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by divyakrishnan
0
<?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>";
     	}
    ?>
0

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
    
     
    }
    ?>

Edited by divyakrishnan: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.