array

A

Anonymous

Guest
why cannot show the picture using this method?
got another way to do it?
thanks...

Code:
<? 
mysql_select_db($dbname, $link);
$result=mysql_query("select * from user_detail where nickname = '$name'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo"<img src=\"./image/$number_of_array[image_name]\">";
}				
?>
 
This this:
Code:
echo "<img src=\"./image/" . $number_of_array[image_name] . "\">";
Or better yet:
Code:
echo '<img src="./image/' . $number_of_array['image_name'] . '">';
 
i've tried all the possible ways to do that, but can't....

it just shows this when i check the properties of the picture, without the "william.jpg"

http://localhost/image/
 
Try to link to the image like:
Code:
echo '<img src="image/' . $number_of_array['image_name'] . '">';
BTW, make sure it´s everything alright with the file name: echo $number_of_array['image_name'];
 
Back
Top