I just started using OOP / CodeIgniter. I want to get assign the form input to variables. I wonder which one I should use $this -> var or $var and how they differ from each other? Thanks.
For example
$agree = $this -> input -> post( 'agree' );
OR
$this -> agree = $this -> input -> post( 'agree' );
Both will work fine like:
if ($agree) { }
OR
if ($this -> agree){ }
Thanks
It’s a matter of scope