Jump to content

pulling images from database


lillizzierae

Recommended Posts

hi. i really need some help here. i'm doing my final and i have to pull images from my database. the problem is i was never taught this in class. and i've been looking everywhere to understand how to do it but can't find anything. i'm clueless!  Huh

 

what i'm trying to do is make a gallery on one of my pages (http://lizzienichols.com/work.php). right now there's no php or anything getting pulled from the database. it's simply set up the way i know how to set it up.

 

if someone could take some time to explain it to me i'd appreciate it. help.. please?  Grin

 

liz

 

you can get in touch with me through email too

(lillizzierae@aol.com)

Link to comment
Share on other sites

Hi Liz,

 

Do you actually want to store the binary image data in the database, or just the filenames? I had a look at your website and it appears that the images are stored in a directory named 'images'. If you wanted, you could just store the filenames in a table in the database, then use a query to form the basis for generating img links.

 

In fact, you don't even need to go to the trouble of storing file names in a database if all you want to do is display the images in that directory. I have a photo gallery page on my site that just gets all files in a particular directory and if they end in .jpg or .gif, adds that filename to an img tag in a table (html table that is).

 

Hope this gives you a few pointers.

 

Cheers,

Darren.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.