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
|
|
|
 |
|