Closed Thread
Results 1 to 2 of 2

Thread: Show pictures from DB

  1. #1
    Flezria is offline Learning Programmer
    Join Date
    Sep 2009
    Posts
    55
    Rep Power
    0

    Show pictures from DB

    Hello guyse, i made this upload system wich is working.
    But i got this problem with getting the pictures out im uploading to the mysql db.
    I wanna know how i can get the pictures out and showing them, here my code:

    Code:
    <?php

    $connect 
    mysql_connect("","","");
    $select_db mysql_select_db("",$connect);

    $selectpic mysql_query("SELECT picture, title, discription FROM upload");

    while(
    $rowpic mysql_fetch_row($selectpic)) {
      
        echo 
    $rowpic[0];
        echo 
    "<br />";
        echo 
    $rowpic[1];
        echo 
    "<br />";
        echo 
    $rowpic[2];
    }

    ?>
    ( yes i know i spelled description wrong, just too lazy to fix it )

    thanks from flezria

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: Show pictures from DB

    this tutorial will help you alot.

    Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    You can't just echo the content of the picture in the middle of the web page. you need to follow some special ways, which is shown in that tutorial.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP does not show pictures
    By Turboorav in forum PHP Development
    Replies: 2
    Last Post: 05-29-2010, 10:19 AM
  2. ..:: Importing Pictures ::..
    By bahrain in forum Visual Basic Programming
    Replies: 4
    Last Post: 12-12-2008, 12:55 PM
  3. Spaces between pictures
    By dirkfirst in forum HTML Programming
    Replies: 4
    Last Post: 02-28-2007, 09:22 AM
  4. Enlarging pictures
    By TechNetiuM in forum Website Design
    Replies: 6
    Last Post: 02-04-2007, 12:29 PM
  5. Post your pet pictures!
    By TcM in forum The Lounge
    Replies: 6
    Last Post: 01-05-2007, 11:16 PM

Tags for this Thread

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