#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    4
    Rep Power
    0
    I´ve a Oracle DataBase (PeopleSoft) where the employee´s picture is stored in blob field. I should display this pictures in the web pages, that I'm making it in PHP. But, when I load the page, the picture appear only a third part.

    What's the problem?

    Tnx.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    your page header should be image(ie, image/gif or image/jpg).

    <?
    header("Content-type : image/gifnn");
    //it should change to image/jpg if, your picture is jpg.

    ?>

    then write the picture to page.after that it should work fine..




    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    4
    Rep Power
    0
    I make this and worked, but not fine. The picture begin to display and don't terminate.

    I've using ODBC connection.

    Tnx.

    Example:
    ------------------
    $id=odbc_connect("DSN_Name","User_name","Password",1);
    $sql="SELECT emplid,employee_photo FROM PS_EMPL_PHOTO where emplid='$id'";
    $rs=odbc_exec($id,$sql);
    while($rw=odbc_fetch_row($rs))
    {
    $id=odbc_result($rs,1);
    $img=odbc_result($rs,2);
    header("Content-type: image/jpeg");
    echo $img;
    }

Similar Threads

  1. how to upload text file into blob field
    By misoz in forum MySQL Help
    Replies: 8
    Last Post: February 5th, 2004, 03:48 AM
  2. Inserting from form to multiple tables
    By barth in forum MySQL Help
    Replies: 0
    Last Post: January 25th, 2004, 10:27 AM
  3. return value from 3 fields into 1 field
    By denali in forum MS SQL Development
    Replies: 1
    Last Post: December 19th, 2003, 08:44 AM
  4. copy BLOB field to another
    By keyser_soze in forum PHP Development
    Replies: 0
    Last Post: December 2nd, 2003, 11:40 AM
  5. copy BLOB field to another
    By keyser_soze in forum MySQL Help
    Replies: 0
    Last Post: December 2nd, 2003, 09:47 AM

IMN logo majestic logo threadwatch logo seochat tools logo