load image as link from database

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 112
Joined: Tue Mar 15, 2011 4:05 am

Fri Apr 27, 2012 4:54 pm


you can try something like this :

Code: Select all

//database query
echo '<a href="'.$image_URL.'"><image src="'.$image_URL.'"></a>';

User avatar
New php-forum User
New php-forum User
Posts: 236
Joined: Sat Apr 14, 2012 11:57 am
Location: Vilnius, Lithuania

Sat Apr 28, 2012 1:00 pm

You need to have PHP code which would pass image from database to browser window by image ID/name.

Link to images could look like that

Inside of image.php you would look up for image in database with 35 as ID, fetch image data, form headers for image and print it.

Post Reply