Jump to content

call to undefined method


Angelojoseph17

Recommended Posts

I have a class called cid which contains these functions:

 

	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->conn);

		return mysql_query($sql, $this->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->conn);

		return mysql_query($sql, $this->conn);

	}

 

It is called in a page called create order.

 

 

/ Add a new delivery address to the order

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



               // Add invoice address to the order

       $cid->UpdateInvoiceAddress($_POST['orderNumber'], $_POST['invoiceaddress']);

 

I get a call to undefined method error. Can anyone help me.

 

thank you

 

 

:(

Link to comment
https://forums.phpfreaks.com/topic/248047-call-to-undefined-method/
Share on other sites

Use get_class_methods to see what methods php thinks exist for the class.

 

You either have a spelling error, multiple include files in different folders, or the actual class that got uploaded to the server isn't the one that contains that method(s).

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.