Jump to content

PHP mySQL: Outputting images dynamically?


webmaster1

Recommended Posts

Hi All,

 

I want to output all existing records (text and three images) from a mySQL database. The image files are stored as paths btw. I want to output the three images dynamically rather than one beneath the other.

 

By dynamic I mean:

 

[*]An image viewer of sorts comprised of thumbnails that when clicked on display a larger size of the image.

[*]Occurs within the one same page and each record has its own image viewer.

 

A perfect example of what I'm looking for can be found here: http://www.carzone.ie/search/Alfa-Romeo/145/200840190195708/advert

 

??? My question is how should I approach this (PHP or Javascript or Ajax) ?

??? Does anyone know of any decent free open source tools or tutorials for this?

 

I can't seem to pull up a whole lot of information on this through searching. 

 

 

Link to comment
https://forums.phpfreaks.com/topic/133973-php-mysql-outputting-images-dynamically/
Share on other sites

PHP + JS.

 

 

I don't know of a tutorial.

 

I've found a JS solution: http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

 

Given that I'll only have about twenty records (20 images viewers x 3 images = 60 images total) is it realistic to try and attempt squeezing all of this into the one page?

 

 

Check to see if your host supports the gd library; if it does, you can generate images on the fly including resizing.  The downside is it's somewhat static, so you could use an iframe, and or javascript along with $_GET to "dynamcially" change each image, or try ajax.

 

Here's a link to gd and here's one to some thumbnails page using php and js.  I don't know if either will meet your need, but thought I'd throw it out there.

 

HTH.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.