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