Jump to content

Using images with php and sql


woodsy130

Recommended Posts

I am creating a website that will use static images that wont change on certain pages, similar to the way clothing stores do with pictures of their clothes.

 

What is the best way to do this? Do i store each image in a directory and store the imagepath in the database? and then use html to fetch the image?

 

Also, i want the user to click on each image to display more information (eg. clicking on an image of a jumper to display more information on it such as the size etc). Will I have to create a new file for EVERY image I use?? or is there a more efficient way of doing this?

 

PLS PLS PLS HELP!!!

 

Thanks

Link to comment
Share on other sites

Here's how I would do it

 

Product Table

Name, ImgSrc, Description

 

Then you can use php to grab the info and construct the link. Maybe even a jquery modal window for the description when the user clicks on it.

 

Just my two cents

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.