I am getting the following error
Fatal error: Call to a member function getcustomerid() on a non-object in C:\Xampp\xampp\htdocs..... on line 54
Basically, I am passing in userid to the customer class. If this customer exists i,e the number is a valid id , the class is created eg. name, address etc. I can then call a function of this class
Code: Select all
$customer = new customer($customerid);
echo $customer->getcustomerid();
echo $customer->getfirstname();Fatal error: Call to a member function getcustomerid() on a non-object.
Basically I need to return some sort of message if the customer id( therefore the customer ) doesn't exist
Any ideas?
Thanks