MySQL Forums
Forum List  »  PHP

Re: Show images from database
Posted by: Rick James
Date: April 21, 2012 07:45PM

> $out.="<img src=\"{$var['field_image_in_database']}\">
No.
src has to point to a file or a script.

$out.="<img src=\"filename\">

or
$out.="<img src=\"display.php?name={$var['field_image_in_database']}\">
And then you write display.php to take one argument (name) and fetch the image, then render it. Some of these may have examples:
http://forums.mysql.com/read.php?52,516761 (Output Image)
http://forums.mysql.com/read.php?52,423884 (variable not getting passed)
http://forums.mysql.com/read.php?10,398960 (How to retrieve images from a database)
http://forums.mysql.com/read.php?10,396307 (Database / Graphing)
http://forums.mysql.com/read.php?20,379180 (MySQL, Django, Python, html allllll in one! Help!!!)

Options: ReplyQuote


Subject
Written By
Posted
Re: Show images from database
April 21, 2012 07:45PM


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.