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.

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

Character Sets/Collations Stuff
Can someone please give me a check list of things I must do to setup all the charset stuff for my ph

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

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