Hello, after I changed ADD to save, it always prompts that the modification failed, but if it is add, it can be added successfully. What is the situation?
En_Answer
2017-08-09 15:58:44
Hello, after I changed ADD to save, it always prompts that the modification failed, but if it is add, it can be added successfully. What is the situation?
In the edit method, you also need to get the id from the hidden field and save it to data[] $data['id']=I('id');
For example, if you use the ID field as a condition to update a data row, you must pass in the ID field as a condition. And you need to add a hidden field, assign the ID to it and submit it as a form. The ID of the previous page can no longer be used
To modify, please add a hidden field to the ID value of the incoming article on the submission page