Why is so dificult to save and update data on index/index.php file?
Anyone has any idea?
I try to follow the tutorials on the web but there is always something wrong.
Thx
Solved! Go to Solution.
You can get reference from below post,
http://clever-code.com/how-to-save-form-data-to-the-custom-table-in-magento-2/
From BSS Commerce,
https://bsscommerce.com/confluence/how-to-create-insert-data-into-the-table-in-magento-2.html
@Sunil Patel wrote:
Hello,
You need to share you code to debug it
Make sure folder name should be right e.g folder name Index not index
Same for controller file name.
Hope it will help you
HelloSunil,
my code is just this:
app/code/bi/BiPerguntas/Controller/Adminhtml/Index/Index.php
$postData = $this->getRequest()->getPost();
if (!empty($postData)) {
}
inside the post data I have the posta from the form.
Now, the question is how do I save this on magento 2?
Thanks mate
You can get reference from below post,
http://clever-code.com/how-to-save-form-data-to-the-custom-table-in-magento-2/
From BSS Commerce,
https://bsscommerce.com/confluence/how-to-create-insert-data-into-the-table-in-magento-2.html