SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Image is not dispalying

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

    while(
    $query_row mysql_fetch_assoc($query_run) ) {
          
    $query_row['value'];
          
    $image $query_row['value']; 
    PHP Code:
    <?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

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    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?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!!!!!!!

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by gauri_mankame View Post
    1. No i can see the Image icon in Google chrome & in Internet browser i can see the Red 'x'
    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" />

    Quote Originally Posted by gauri_mankame View Post
    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.
    Sorry, I dont use Drupal.

    Quote Originally Posted by gauri_mankame View Post
    3. Yes Path is correct that's what i can see the Icon.
    No, you see the icon because the path could be wrong!

    Quote Originally Posted by gauri_mankame View Post
    4. Yes it is JPEG & GIF Format but both not working!!!!!!!
    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?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    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?

  6. #6
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  7. #7
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey my issue got solved just gave an ip address of my laptop & the port no of a localhost!!!!!!!




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •