I am just a newbie in cakephp and struggled a lot as a beginner, I hope im not exaggerating. I believe I was on the right track of coding a simple registration application when I found out that I am not able to insert any data in my database. The name of my database is “cake” and this is the default configuration:
public $default = array{
'datasource'=>'Database/Mysql',
'persistent'=>false,
'host'=>'localhost',
'login'=>'root',
'password'=>'',
'database'=>'cake',
'schema'=>'',
'prefix'=>''
}
By the way, the index page of my localhost says that I am connected to the database.
try these
$this->User->save($this->request->data);Set your debug level higher than 0 in Config/core.php to see errors if they exist
Generally the save doesn’t work because of validation. You can list invalid fields by
debug($this->User->invalidFields()); // will only show when debug > 0