i have table “car_types” ,a Controller users_controller and action url
localhost/carsdirectory/users/dashboard
in users_controller.php file i used that function
public function dashboard(){
$this->set('users', $this->Car_type->find('all'));
}
i want to retrieve data from car_types and want to show
localhost/carsdirectory/users/dashboard in select box
i m getting those error
Undefined property: UsersController::$Car_type
i know, i am wrong but not able to sort out that problem
plz help me thanks in advance , vikas tyagi
It seems there’s no relation between Users & Car_Type, you could do:
To populate it in selectbox, something like this should work:
Hope it helps