View Full Version : Mysql + link to picture in a folder from php document

05-13-2006, 07:50 PM
Hey Guys... :D - newbie!!!

im building a new website and I would like to link to a picture from my mysql database or a php document , I keep my pictures in a folder.

for example... I have a index.php with some text from the database - then a picture linked from the folder (where should it be linked from??? ) - then some more text from the database.

what is the correct thing to do??? syntax please...

trainer :wink:

05-14-2006, 03:04 AM
im wondering the same exact thing

im referencing the database correctly from dreamweaver because when i hit test or preview it shows the TEXT from my database that im trying to reference.

when i check it on the internet, it shows the borken link image with the red "x".

not sure if my database should be text or varchar or blob or what. im trying to reference my image in it's folder from the database.

root: www/images/logo_main.gif

i've tried typing in the database field


it just wont reference...im screwing something dumb up.

05-15-2006, 12:20 AM
got it...


1) case sensitive!!!!!
2) use ../ to go back a folder...make sure you are referencing the right folder
3) datbase field should be set to TEXT...wont work in varchar

05-18-2006, 09:22 PM
Can anyone show us the syntax??? 8)

05-19-2006, 06:02 AM
images/logo_main.gif I would think

05-19-2006, 06:55 AM
ok thanks... this worx "img/bee.jpg"