Why does PHP think my method is undefined?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5128198/php-function-question">PHP function Question</a>  </p>
</blockquote>



<p>I asked this question earlier but I do not think I provided enough code for the question to be answered.  I racking my brain on this and I cannot figure it out.  The is the error</p>

<p>I am getting the error "Fatal error: Call to undefined method person::retrieve_full_name() in /home/mjcrawle/public_html/processlogin2.php on line 25"</p>

<p>Html page Processlogin2.php page:</p>

<pre><code>&lt;?php
/*include the class file*/
require_once('class/person_class.php');

$person = new Person;

/*instantiate the person object*/
$person-&gt;firstname = $_POST['firstname'];
$person-&gt;lastname = $_POST['lastname'];

?&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org    /TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Process Login&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;p&gt;
&lt;?php

echo 'Your full name is ' . $person-&gt;retrieve_full_name() . '.';

?&gt;

&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>The is my Class form I created including all of my functions and attributes etc...</p>

<pre><code>&lt;?php
/*person*/

class person{
    /*construct function*/
    public function __contstruct() {
    }/* This end the Construct Functions*/

    public function __destructor() {

    }
    /*class attribute*/
    private $lastname;
    private $firstname;

    /*get function */
    public function __get($name){
    return $this-&gt; $name;

    }/* This ends the Get Functions*/

    /*This function is going to have to parameters with it.  We are going to add the this attribute to it.*/

    public function __set($name, $value) {
        $this -&gt;$name=$value;   
    }/* This ends the Set Functions*/

    public function __retrieve_full_name() {
        $fullname = $this-&gt;firstname . ' . ' . $this-&gt;lastname;
        return $fullname;
    }/* This ends the Full Name Function*/

}

?&gt;
</code></pre>
