Storing/displaying image urls in a database?


Posted on 16th Feb 2014 07:03 pm by admin

Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is added into the db, including url.
However I can't figure out how exactly i should be storing the url for the image.
Did you know?Explore Trending and Topic pages for more stories like this.

What data type should i use? How to insert it/extract it (with the backlashes/etc neeeded) ? Should I store the full http://www.somesite.com/imageurl.jpg or just somesite.com/imageurl.jpg ? (as little as possible)
How do i then display it?

Had a quick search here...no luck finding what i'm looking for..had a look on google but ended up just finding info on the BLOB data type..which would be inserting the actual image binary data into the database i believe.

Any help?

Thanks
No comments posted yet

Your Answer:

Login to answer
264 Like 29 Dislike
Previous forums Next forums
Other forums

Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...

function getTreeWithChildre

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash