call to undefined method php error
<p>I have a class called CHCID which has the two functions inside it: </p>

<pre><code>public function UpdateDeliveryAddress($orderNumber, $deliveryaddress) {

    $sql = "UPDATE `CIDOrders`

    SET `DeliveryAddress` = '" . mysql_real_escape_string($deliveryaddress) . "'

    WHERE `CIDOrderNumber` = " . $orderNumber . ";";

    mysql_select_db(DB_DATABASE_NAME, $this-&gt;conn);

    return mysql_query($sql, $this-&gt;conn);

}

public function UpdateInvoiceAddress($orderNumber, $invoiceAddress) {

    $sql = "UPDATE `CIDOrders`

    SET `InvoiceAddress` = '" . mysql_real_escape_string($invoiceaddress) . "'

    WHERE `CIDOrderNumber` = " . $orderNumber . ";";

    mysql_select_db(DB_DATABASE_NAME, $this-&gt;conn);

    return mysql_query($sql, $this-&gt;conn);

}
</code></pre>

<p>I call this class in a page called createorder.php as follow: </p>

<pre><code>// Add a new delivery address to the order

$cid-&gt;UpdateDeliveryAddress($_POST['orderNumber'], $_POST['deliveryaddress']);

// Add invoice address to the order

$cid-&gt;UpdateInvoiceAddress($_POST['orderNumber'], $_POST['invoiceaddress']);
</code></pre>

<p>I get the following error : </p>

<pre><code>PHP Fatal error:  Call to undefined method CHCID::UpdateDeliveryAddress() 
</code></pre>

<p>Can anyone help. </p>

<p>Many thanks </p>

<p>Code initialising the class. </p>

<pre><code>require_once $CID_INCLUDE_PATH . "/cid.php";

$cid = new CHCID();
</code></pre>

<p>Constructing class </p>

<pre><code>class CHCID {



    var $conn;



    // Constructor, connect to the database

    public function __construct() {

        require_once "/var/www/reporting/settings.php";

        if(!$this-&gt;conn = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD)) die(mysql_error());

        if(!mysql_select_db(DB_DATABASE_NAME, $this-&gt;conn)) die(mysql_error());

    }
</code></pre>
