如何获取 Paypal 返回的下拉菜单的值?
我想知道如何使用 Paypal 获取下拉菜单的值。
Paypal 方面一切正常,除了我不知道我的会员正在支付哪个订阅费用。
我的表格如下:
<input type="hidden" name="on0" value="Formula">Formula
<select name="os0">
<option value="Basic">Basic €5</option>
<option value="Standard">Standard €10</option>
<option value="VIP">VIP €20</option>
</select>
请问如何获取所选值?我猜是这样的:
$_POST['os0']
...但这行不通。请问我缺少什么?
非常感谢任何帮助,谢谢!
I'd like to know how to get the value of a dropdown menu with Paypal.
Everything works fine on Paypal's side, exept the fact that I don't know which subscription my members are paying for.
My form is as follow :
<input type="hidden" name="on0" value="Formula">Formula
<select name="os0">
<option value="Basic">Basic €5</option>
<option value="Standard">Standard €10</option>
<option value="VIP">VIP €20</option>
</select>
How can I grab the selected value please ? I guess it's something like :
$_POST['os0']
...But this doesn't work. What am i missing please ?
Any help much apreciated, thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这是否是您的问题,但如果您不使用 HTTP POST,那么这些值将不会显示在
$_POST['os0']
中。尝试使用$_REQUEST['os0']
来代替,看看是否可以通过这种方式获取值。您可以在PHP 文档中阅读有关 $_POST 和 $_REQUEST 的更多信息。 中了解如何设置表单提交方法:
您可以在Mozilla文档 了解有关 HTTP GET 和 POST 一般来说,你可以阅读他们的W3C规范。
I'm not sure if this is your problem or not, but if you're not using HTTP POST, then the values won't show up in
$_POST['os0']
. Try using$_REQUEST['os0']
instead and see if you get the values that way.You can read more about $_POST and $_REQUEST at the PHP docs. You can read about how to set the form submission method at the Mozilla docs:
To learn more about HTTP GET and POST in general, you can read their W3C specifications.