在表单中发送POST和GET [英] Send both POST and GET in a form

查看:111
本文介绍了在表单中发送POST和GET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要让表单发送POST和GET请求(由于IE和iframe中存在一些错误),你怎么能这样做?

发送是没有什么大的安全,所以无论如何它可以通过GET设置,只需要确保它是双向设置。



感谢您的帮助!

解决方案

简单:只需在表单URL中指定GET数据。

 < form method =POSTaction =form.php?a = 1& b = 2& c = 3>但是,仔细检查接收脚本中的数据是如何使用的。不要使用 $ _ REQUEST   - 而是解析 $ _ GET  $ _ POST 根据您的确切需求和您需要的优先顺序。


I need to make a form send both POST and GET requests (due to some bugs in IE and iframes), how can you do so?

The data being sent is nothing mega secure so it doesn't matter if it can be set via GET, just need to make sure it is set both ways.

Thanks for the help!

解决方案

Easy: Just specify the GET data in the form URL.

<form method="POST" action="form.php?a=1&b=2&c=3">

however, very carefully check how the data is used in the receiving script. Don't use $_REQUEST- rather parse $_GET and $_POST according to your exact needs and in the priority order you need them.

这篇关于在表单中发送POST和GET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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