Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Unanswered: MySQL, PHP and Images

    Hello people!!!
    I really really need some help because i'm new with mysql and php.
    I need help in inserting images in a mysql database, getting it and putting it in a web page.
    Please help me.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: MySQL, PHP and Images

    Originally posted by JuanPablo
    Hello people!!!
    I really really need some help because i'm new with mysql and php.
    I need help in inserting images in a mysql database, getting it and putting it in a web page.
    Please help me.
    I think this post belongs to the PHP section.
    Anyway look at: http://www.devarticles.com/c/a/MySQL...PHP_and_MySQL/

  3. #3
    Join Date
    Oct 2003
    Posts
    706

    Lightbulb

    My solution to that issue is... don't store the images in the database; store them in a separate directory and locate the images using the database. SQL servers aren't a great place to store large chunks of data. Browsers work best, cache things best, and so-on when the data originates from a file.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  4. #4
    Join Date
    Jun 2003
    Posts
    8
    I had the same problem a few weeks ago. Here is some code that might help:

    echo "<img src='path to/folder/containing/images/$image_name' height=$image_height width=$image_width>";

    As sundialsvcs stated, store the image names in the db and the images in a directory on the server. Then all you have to do is read $image_name, $image_height and $image_width from the database and place the above code wherever you want the image(s) to appear.

Posting Permissions

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