Syntax error: $this when not in object

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lmedina3
    New Member
    • Jul 2013
    • 1

    Syntax error: $this when not in object

    Code:
    $paypal_item = $sitename." Service Monthly Subscription";
    	$paypal_item_number = $sitename;
    	$mainipn = $siteurl."/ipn.php";
    	$paypal_ipn = $siteurl."/site_ipn.php";
    	$paypal_cancel_return = $siteurl."/cancel.php";
    	$paypal_return = $siteurl."/thanks.php";
    	$this->min_pass_length=8;
    	$this->max_pass_length=12;
    	$this->chars='abcdefghijklmnopqrstuvwxyz0123456789';
    something is wrong with $this->min_pass_lengt h, but I'm a newbin and can't figure it out. How can I fix this?
    Last edited by Dormilich; Jul 9 '13, 05:49 AM. Reason: Please use [CODE] [/CODE] tags when posting code.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    the special variable $this only works when used in an object context, i.e. inside an object’s method.

    Comment

    Working...