form使用Get方式提交表单时是不是不能通过URL传递参数的?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:02:26
Original
1577 people have browsed it

代码如下:

<form  method="get" action="test.php?flag=test" target="_blank">	<input type="submit" /></form>
Copy after login


php服务器很简单,就是获取flag的值以后,直接输出!

我发现上面的代码只有在method="post" 的时候才能工作!是不是使用"get"的时候,必须通过 "


回复讨论(解决方案)

get就是url?后传递参数的。

都可以!不过你那是表单!在action='url'这里面的url地址也是可以更参数,他会在地址栏显示出来,你在php页面获取值时就当做get方式获取吧;v = $_GET['name']

可以我就不问了!你们要是不清楚,做了实验再来好不好!

按照我的代码提交后,test.php 是获取不到 flag 的值的!

嗯,那样是不行的。它会重新组织后面的参数。

可以我就不问了!你们要是不清楚,做了实验再来好不好!

按照我的代码提交后,test.php 是获取不到 flag 的值的!


自己代码写错了,不要说别人没做过。

楼主 是 这样的 get方式 获取不鸟 url带的参数

index.asp

<%	response.write request("flag")%><form  method="get" action="index.asp?flag=test">    <input type="submit" /></form>
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!