php - get类型的表单,数据接收不到
習慣沉默
習慣沉默 2017-05-16 13:07:25
0
3
650
<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>
<body>
<form method="get" action="">
<input>
<input>
<input type="submit" value="tijiao">
</form>
</body>
</html>
<?php

if($_GET){
   var_dump($_GET);
}
  
習慣沉默
習慣沉默

Antworte allen(3)
Peter_Zhu

哥,你的表单连name属性都没有,肯定接收不到数据啦

大家讲道理
<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>
<body>
<form method="get" action="">
<input type="text" name="vi">
<input type="submit" value="tijiao">
</form>
</body>
</html>
<?php

if($_GET){
   var_dump($_GET);
}
某草草
<input type="submit" value="tijiao" **name="XX"**>
var_dump($_GET['XX']);
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage