eL_NiNo
Oct 2nd, 2002, 11:11 AM
I have a problem accessing my members of my class :
<?php
class CUser
{
var $strName;
var $lID;
function CUser()
{
$strName= '';
$lID = 0;
}
function Load( $strLogon )
{
$strName = 'test';
$lID = 999;
echo $strName; // Output 'test'
}
}
In PHP page :
$cxUser= new CUser;
$cxUser->Load( 'mylogon' );
echo $cxUser->strName; // output ''
$cxuser = null
?>
any idea ?
<?php
class CUser
{
var $strName;
var $lID;
function CUser()
{
$strName= '';
$lID = 0;
}
function Load( $strLogon )
{
$strName = 'test';
$lID = 999;
echo $strName; // Output 'test'
}
}
In PHP page :
$cxUser= new CUser;
$cxUser->Load( 'mylogon' );
echo $cxUser->strName; // output ''
$cxuser = null
?>
any idea ?