在magento中提交表单后如何获取帖子数据变量 [英] How to get post data variables after submition a form in magento

查看:78
本文介绍了在magento中提交表单后如何获取帖子数据变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取发布变量的数据?就像我使用post方法发布表单一样,我可以使用$ _REQUEST或$ _POST来获取它.我如何在mgento中做到这一点?

How do I get data of post variables ? Like if I post form with post method then I can get itt with $_REQUEST or with $_POST. How I can do this in mgento ?

推荐答案

您可以使用$this->getRequest()->getParams();获取所有变量.这将返回所有变量.对于诸如id之类的任何特定名称,您可以使用不带"s"的$this->getRequest()->getParam('id');.希望这会有所帮助.

You can get all variables using $this->getRequest()->getParams();. This will return all variables. For any particular name like id you can use $this->getRequest()->getParam('id'); without the "s". Hope this will help.

这篇关于在magento中提交表单后如何获取帖子数据变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆