/    Sign up×
Community /Pin to ProfileBookmark

How to store image file in mysql and display it on php page???

Hi all:
what type of variable do you store an image file in mysql? and how you use echo syntax to display an image file on php page?

Thanks,

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 13.2006 — The general consensus is that you do not store image files in the database. Rather, you store them in a filesystem directory and store the filename in the database. (The basic issue is that you do not want to bog down your database with megabytes -- or even gigabytes -- of binary data).
Copy linkTweet thisAlerts:
@smallstoneauthorJul 13.2006 — NogDog:

Thanks so much for your quick reply.

I am just curious that there is an unique method to post an image in php page.
Copy linkTweet thisAlerts:
@NogDogJul 13.2006 — NogDog:

Thanks so much for your quick reply.

I am just curious that there is an unique method to post an image in php page.[/QUOTE]

Afraid I do not understand the question.
Copy linkTweet thisAlerts:
@smallstoneauthorJul 13.2006 — NogDog:

I apologize to confuse you. I meant that I understand what you are saying. I guess what I am curious is that how many ways can we post an image on php page.

SS
Copy linkTweet thisAlerts:
@NogDogJul 13.2006 — If you mean "display" an image ("post" has a specific meaning for web pages: a means of uploading data via the HTTP post protocol), then you'll normally just create an IMG tag as per normal HTML. The SRC attribute of that tag will likely lcontain a PHP variable which you've populated from your database.
Copy linkTweet thisAlerts:
@smallstoneauthorJul 13.2006 — NogDog:

Thanks,
×

Success!

Help @smallstone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...