|
public boolean add(Car carIn);
The signature here indicates that this is an object context method, but the call is that on CarShowRoom.add which is static. You need to construct an instance of CarShowRoom in order to .add to it, or flag the method as static. If the cars array is static and the total is static, than the method can be flagged as static. Otherwise, you need to instantiate CarShowRoom in order to invoke the .add.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
|