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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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