CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 getting image url from database

Print topic Send  topic

Author Message
blasalle

Posts: 69
Posted: 01/29/2009, 7:36 AM

This is a general question in terms of how to do this but the implementation may be more specific to CCS. I have a table in a header file (include page) that I want to display data based on the login site (CCGetSession ("GroupID")). On of the data items is an image related to the site. So instead of a static URL for the image I want to get it from the database. I don't think this is difficult but I can't seem to find the solution.

thanks

bernie

_________________
Bernie
University of Utah
Salt Lake City, UT USA
View profile  Send private message
datadoit
Posted: 01/29/2009, 8:25 AM

CCS has a thousand ways to skin cats. Here's how I would do it...

Use the Template variable to adjust the image.

Page BeforeShow:

global $Tpl;
if (CCGetGroupID() == "whatever") {
$Tpl->SetVar("logo", "../images/logo.gif");
}

In your HTML, where the image placeholder should be:

<img src="'{logo}' border='0'">

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.