Image URL in database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
cupaball
Forum Commoner
Posts: 85
Joined: Sun Feb 12, 2006 1:46 pm

Image URL in database

Post by cupaball »

I must be searching this wrong...b/c I can't find anything solid.

Can someone point me in the direction of a tutorial to store the image URL in a mysql db and the php scrpit to display the image.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

http://www.freewebmasterhelp.com/tutorials/phpmysql

Keep in mind that you only want to store the link to the image, and not the actual image in the database.
cupaball
Forum Commoner
Posts: 85
Joined: Sun Feb 12, 2006 1:46 pm

Post by cupaball »

thanks, I'll check it out.

But I think I have try that tutorial before and it wasn't much help.

Any others?
cupaball
Forum Commoner
Posts: 85
Joined: Sun Feb 12, 2006 1:46 pm

Post by cupaball »

okay, I am losing it!

I understand that all I have to do is create a table that has an ID, Image URL, and description (if needed).

I cannot find any script as to how to display the image. I have a fairly good idea how to show the description.

I am either looking for the pic to match the url when clicked based on the ID (for example something like http://www.site.com/test.php?A=12, I don't even know if that is right)

or

just have the pic showup by defining the variable by the ID in php.

Thanks!
Post Reply