MySQL Forums
Forum List  »  PHP

Re: Store GIF in Blob and show GIF on page
Posted by: Ulf Wendel
Date: August 21, 2006 09:13AM

The path of the image is nothing but a string. A string that you store in an appropriate field in a database table. A table like:

CREATE TABLE mytable (
[...]
image_path varchar(127),
[...]
)

Plus some code like the one shown on http://de2.php.net/manual/en/function.mysqli-fetch-assoc.php, but with a different query, like SELECT image_path from mytable.

You can use any of the tutorials/examples that demonstrate how to access a MySQL database from PHP.

And regarding the HTML that you sketch, consider storing only the path and no img-tag or other HTML stuff in the database. You know the img-tag, don't you...

Ulf

Options: ReplyQuote


Subject
Written By
Posted
Re: Store GIF in Blob and show GIF on page
August 21, 2006 09:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.