- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Save post data on index/index.php
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
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Save post data on index/index.php
@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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Save post data on index/index.php
If you want to do save into custom table then you need to create model for that.
Sample module:https://github.com/cedcommerce/magento-2-sample-module/tree/master/YourModuleName/Controller/Adminht...
Hope it will help you.
If you like then give kudoes
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Magento 2 Blogs/Tutorial