load image as link from database

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
gandahar
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

hi!

you can try something like this :

Code: Select all

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

User avatar
minimihi
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
http://your_domain.com/image.php?id=35

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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests