Image is not dispalying


$query = "SELECT value FROM profile_values where uid= '".$player."' and fid = '12'";
$query_run = mysql_query($query);
      
if(mysql_num_rows($query_run) >= 1 ){

while($query_row = mysql_fetch_assoc($query_run) ) {
      
$query_row['value'];
      
$image = $query_row['value'];


<?php echo '<img src="/'.$image.'" alt="" align = "left" width = "250" height = "250"/>';?>

i have wrote this code for image will explain

$image is nothing but a variable to which i have assign database’s image value!!!

but in my page i can see the image icon not the image plz hemo

Hi gauri_mankame and welcome to SitePoint.

If you view the source of the page in your browser, what do you get in the <img> tag?
Does the value come from the database print out?
Does it have the correct path to where the image is?
Does it have a .jpg extension in the database or is it just an image name?

  1. No i can see the Image icon in Google chrome & in Internet browser i can see the Red ‘x’
  2. Yes value is the Field name where the image path is getting insert i m using drupal 6 database (Profile Module) hope this will give u clear idea why value is the Field Name.
  3. Yes Path is correct that’s what i can see the Icon.
  4. Yes it is JPEG & GIF Format but both not working!!! :frowning:

If you view the source (right click and choose view source), find the img tag - is the path complete? eg: <img src=“path/to/image.jpg” />

Sorry, I dont use Drupal.

No, you see the icon because the path could be wrong!

In the database, is the filename stored as something like: myimage.jpg OR myimage

do you have the page online anywhere so we can see it?

No the Page is online yet it is under development.

Will do 1 thing will give bot the path saved in the Database as well as the actual path

Path stored in the Database: sites/default/files/pictures/user–profile_pic.jpg This path has assigned to $image after fetching the value from d’base.

Actual Path: C:\wamp\www\drupal1\sites\default\files\pictures

Hey my issue got solved just gave an ip address of my laptop & the port no of a localhost!!!

:smiley: