Results 1 to 2 of 2

Thread: [RESOLVED] Problem with class & members

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212

    Question [RESOLVED] Problem with class & members

    I have a problem accessing my members of my class :

    PHP Code:
    <?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 ?
    Last edited by eL_NiNo; Oct 2nd, 2002 at 11:34 AM.
    Regards,

    El-Nino

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    *** Resolved ***
    Forgot to use $this->param = value;

    Love those nasty little bug :P
    Regards,

    El-Nino

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width