www.webdeveloper.com
Results 1 to 5 of 5

Thread: photo retrieve from database

  1. #1
    Join Date
    Feb 2014
    Posts
    1

    photo retrieve from database

    PHP Code:
    $sql "select filename from people where id = 15";
                    
    $result mysql_query($sql);
                    while (
    $row mysql_fetch_array($result))
                    {
      echo 
    "<img src=\"admin/images/" $row['filename'] . "\" alt=\"\" /><br />";
                    } 
    Last edited by NogDog; 02-14-2014 at 09:20 AM. Reason: added [PHP] tags around code

  2. #2
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    724
    Your subject says you are having trouble retrieving an item from a table. What error are you getting from your query?

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,334
    Do you have a question about that or some sort of problem with it?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Feb 2014
    Location
    Viet Nam
    Posts
    32
    I think he can not see the image with that source code OR he wants to update image into database?

  5. #5
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    724
    I think we are waiting for the OP to tell us his problem, rather than us guessing.....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles