Jump to content

Recommended Posts

can some help me with a small problem... I have a site that I want to create an admin section for that will allow the user to update a certain page with it's contents- thus far i'm ok cause more is just text and link however there is an image for each entry that I'm unsure how to store...

 

I've been told it's unfair practice to store images in a DB and if that's true then storing them inside folders isn't a problem if that's how it's done - but if that is the case would I just include an upload script to put the image on the server and reference the image In the DB? and in that's the case what foundation would I use while building the DB structure would I use to store links to such images?

 

 

When the image is uploaded you save the images path to the database. When you want to display the image you echo the images path into the <img> tag eg

echo '<img src="' . $row['image_path']; '" />';
Edited by Ch0cu3r
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.