I am trying to follow instructions and I need to initiate a class, I have no idea what that means. I am guessing it refers to this class? class ipb_login {
The class is the "definition", which defines the properties, methods, etc. What you meant to write is "instantiate", which means to create an instance of the class. Use the new keyword to create the instance as follows: <?php $instance = new ipb_login(); //This will create an instance of the ipb_login class. //Now you can set/get properties and invoke methods as needed. ?> I hope this makes sense, else take a look at the basics @ http://us3.php.net/manual/en/language.oop5.basic.php
Thanks, I did this: $instance = new ipb_login(); $instance = ipb_login::is_logged_in(); Code (markup): And it gave me this: Fatal error: Using $this when not in object context in C:\wamp\www\login_api.php on line 364
$instance is an instance of the ipb_login class. Set/Get properties and invoke methods against the $instance object.
Yeah... But that doesn't let you use that code in functions. And you can't repeat the first line more than once.