CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Displaying Info

Print topic Send  topic

Author Message
BradleyMiller
Posted: 07/08/2003, 1:10 PM

I have this code in the "Before Show" on a plain "index.php" page. The page is just a menu for someone logged into my application. I want to use their OrganizationID, which is stored in my LoginInfo table. The problem is I can't seem to get the info to display. Any suggestions?

global $index;
$dbl = new clsDBConnection1();
$LoggedInAs=CCGetUserID();
$OrganizationID=CCDLookUp("OrganizationID","LoginInfo","UserID=".$LoggedInAs, $dbl);
//echo $LoggedInAs."/ Org: ".$OrganizationID;
DaveRexel
Posted: 07/08/2003, 1:29 PM

Hi Bradley

Try placing a template variable ex {onlineInfo}
in the html where you need the display

Here's some code that should work
---------
global $index;
global $Tpl;
$dbl = new clsDBConnection1();
$LoggedInAs=CCGetUserID();
$OrganizationID=CCDLookUp("OrganizationID","LoginInfo","UserID=".$LoggedInAs, $dbl);
$Tpl->SetVar("onlineInfo", $LoggedInAs."/ Org: ".$OrganizationID);
---------

Greetings
Dave
BradleyMiller
Posted: 07/08/2003, 1:54 PM

Yep, that was the ticket. I'm a bit rusty on some of this stuff . . . been doing too many vanilla type backend pages.
DaveRexel
Posted: 07/08/2003, 2:05 PM

aaahhh! vanilla, my favourite flavour...

Jokes aside, after my initial mistrust of templated technologies I find the humble Template Variable to be a lifesaver.

Glad to be of help
Dave

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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