CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Welcome message Label

Print topic Send  topic

Author Message
D Walker
Posted: 08/06/2002, 11:05 AM

Hi,

I would like to have the welcome message with the user name on the page. I have the following code in php.

**generated by CCS**
function BindEvents()
{
global $NewGrid1;
$NewGrid1->Label1->CCSEvents["BeforeShow"] = "NewGrid1_Label1_BeforeShow";
}


function NewGrid1_Label1_BeforeShow() { //NewGrid1_Label1_BeforeShow @40-FC05B158
//Custom Code @41-2A29BDB7
$myuser = CCgetsession("UserID");
$dbl = new clsDBmydb();
$myname = CCdlookup ("ops_name","opslist","opsID = $myuser",$dbl);
//End Custom Code

And in the html section
<!-- BEGIN Grid NewGrid1 -->
{Label1}<strong><font size="4">Welcome</font></strong>
<a href="{Link1_Src}"><font color="#0000ff">{Link1} Add Entry</font></a>
<!-- END Grid NewGrid1 -->

But name is not appearing on the page. Can you help?

Thnx,
D. Walker
Drake S.
Posted: 08/06/2002, 10:59 PM

Your custom code creates a variable called $myname but the variable is not used anywhere as far as I can see.

Assuming you have a field called myname where the message should be displayed, you can set the field value as in:

global $formname;
$formname->myname->SetValue($myname);

where $formname is the name of the form containing the field.

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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