PDA

View Full Version : Link to Images using PHPMYADMIN



stevenbhn
23 Nov 2006, 09:42 AM
Hi,

I have designed and built a blog style site.
I have my database built using PhpMy Admin but i want more than just text in my blogs i want to add images aswell.

Anyone know how i can link my images from a folder on my server into my blog using my database.

I have tried adding a new field "images" VARCHAR 150 then typing in the localhost address but this only appears as the text. :smash:

Alan
04 Feb 2007, 07:10 PM
The handiest way of working it from your current progress would be this:

When you store the location of the image in the database (the image is still on the server though, output the location into an image tag in html.


<?php echo '<img src="' . $image_addr . '" border="0" />'; ?>

That will make it appear on the site.