In the last episode (Jan 13), Toomas said: > Hello List, > > Is there a simplier way to embed an image stored in BLOB field into > HTML than using 2 calls to Perl scripts - one to generate HTML and > another call from that HTML via IMG tag to retrieve and print image? > I mean, something like you do it in a multipart e-mail message?
You can actually do this with HTML as well, by using the little-used "data:" URI. Try copying this into a file and loading it up in a broswer: <h1>Demonstration of embedding GIF image directly in document</h1> This is embedded image: <img src="data:image/gif;base64,R0lGODlhDwAPAJEBAAAAAL+/v/// AAAAACH5BAEAAAEALAAAAAAPAA8AAAIujA2Zx5EC4WIgWnnq vQBJLTyhE4khaG5Wqn4tp4ErFnMY+Sll9naUfGpkFL5DAQA7" /> It's not all that efficient, though, since the image is sent in base-64 and the server sends it on every page load (instead of letting the browser fetch it once and then cache it). If you're worried about the impact of launching a CGI every time you need to pull an image out of the database, see if your webserver has an SQL filesystem module, or something that will let you pull data straight out of the database without involving scripts at all. -- Dan Nelson [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php