1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power

    why is this image not shown from mysql

    printf("name: %s<br>n", mysql_result($result,0,"name"));(This is working)


    echo "<img src=images/" +$picture_name+ "><br>n";(link appears broken when returned!)

    in mysql varchar $picture_name = 1.gif

    1.gif is located on the webserver in my directory/images, so not stored in mysql, so i have to refer to the path as shown above.

    can somebody help me?

  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Niagara Falls (On the wrong side of the gorge)
    Rep Power
    First, + is NOT the concatenation operator in PHP. Use . instead.

    Second, you didn't pull the value of $picture_name from your query result set.

    echo "<img src=images/".mysql_result($result,0,"picture_name")."<br>n";

Similar Threads

  1. Problem: Displaying image link inside table from MySQL
    By Shadowz in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 01:37 AM
  2. uploading image then generating a mysql value
    By emp/ir:kal in forum PHP Development
    Replies: 2
    Last Post: February 10th, 2004, 09:10 AM
  3. Extract image from MySql to display on page
    By PHPme in forum PHP Development
    Replies: 6
    Last Post: January 30th, 2004, 04:06 PM
  4. PHP + MySQL query to make a link
    By emp/ir:kal in forum PHP Development
    Replies: 6
    Last Post: January 22nd, 2004, 12:10 PM
  5. Puting a border around an image within a link
    By richardhennessy in forum HTML Programming
    Replies: 5
    Last Post: January 16th, 2004, 03:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo