Hello Friends,
I am facing a very peculiar issue for past 2 days, i am still not able to find the major reason for that issue. I am posting my concern hoping someone helps in solving the issue & also understanding the concern why is that happening.!
Below are the details of that issue:
I am using the Cake PHP ver: 3.8
I created a table named school_demos with the fields institute_name, email, mobile, created
When saving the data from a webform, it saves the data of institute_name & created fields rest data showing NULL.
In my webform i put the same name, as the name of the database fields. When i am printing the using it $this->request->getData(), it showing the data in the correct format give below
Array
(
[institute_name] => Test Institute
[email] => test@test.com
[mobile] => 98765123213
[user_role] => schools
[register_submit] =>
);
When using it the below code:
$this->loadModel(‘SchoolDemos’);
$user_data = $this->SchoolLeads->newEntity($this->request->getData());
$this->SchoolDemos->save($user_data);
It only saving the data of fields institute_name, created only, rest fields showing NULL.
Please help if any one can or if any can have any idea.
Thank You