Error: Call to a member function create() on a non-object in cakephp. I have already defined all of these in my controller page.
ContactsController:
<?php
public $helpers = array('Html', 'Form');
public $components = array('RequestHandler');
public $uses = array("Contact");
public function index(){
if ($this->RequestHandler->isPost()) {
$this->Contact->set($this->data);
//validates here
}
?>
index.ctp
<?php
//form
echo $form->create("Contact");
echo $form->inputs();
echo $form->end('Send');
?>
But am I still getting the fatal error. need help thanks.