Jump to content

Pulling an image from the database


j05hr

Recommended Posts

I am being completely stupid but I have no idea how this works.

 

I have done the bit where you upload the image to the database, so the image is in the database as a long blob. 

 

How do you pull the image back to get it in the website?

 

I've got this code in my page

 

<div id="picture"><?php echo "<img src='".$sel_subject['image']."'>"; ?><br></div>

 

Thats reads out like,

 

<div id="picture"><img src='image1.jpg'><br></div>

 

Unless i manually put the image1 in the folder then the picture doesn't show up.  So how do I actually get it to come from the database?

 

Thanks,

Josh

Link to comment
https://forums.phpfreaks.com/topic/202289-pulling-an-image-from-the-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.