本文介绍了附加php表单网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前构建了一个简单的表单来获取请求某人的邮政编码.
I currently built a simple form to GET request someones zipcode.
<form action="http://example.com" method="get" target="_blank">
<p>ZIPCODE</p>
<input type="text" name="zip">
<input type="submit" value="Submit">
</form>
提交时将为http://example.com/?zip=ZIPCODE
我要执行的操作会添加一个额外的内容,因此它将为http://example.com/?zip=234&country=usa
What I am looking to do it add an additional piece so it will be http://example.com/?zip=234&country=usa
我尝试添加一个隐藏字段<input type="hidden" name="country=usa"></input>
,但这将=
替换为%3D
,并在其后添加=
,如下所示:http://example.com/?zip=ZIPCODE&country%3Dusa=
I tried adding a hidden field <input type="hidden" name="country=usa"></input>
but this replaces =
with %3D
and adds =
after it like so: http://example.com/?zip=ZIPCODE&country%3Dusa=
如何轻松地将URL附加到country = usa?
How can I easily append the URL with country=usa?
推荐答案
尝试:
<form action="http://example.com" method="get" target="_blank">
<p>ZIPCODE</p>
<input type="text" name="zip">
<input type="hidden" name="country" value="usa">
<input type="submit" value="Submit">
</form>
这篇关于附加php表单网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!