On Sun, 3 Aug 2003, Bill McCormick wrote:

> I would like to store binary data (specifically picture type data,
> jpeg,gif, etc) in a database and pull it out to a template. Is there a
> blob type var for making this easy? How are you all going about this?

template.tmpl:
<img src="image_script.cgi?id=<tmpl_var id>">


image_script.cgi:
#!/usr/bin/perl -w

use CGI;
my $cgi = new CGI;

print $cgi->header("image/jpeg");
get_and_print_image($cgi->param('id'));

__END__




--
Do not meddle in the affairs of troff, for it is subtle and quick to anger.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to