Php 提交按钮是';不要把一切都发送出去
我的提交按钮没有发送所有表单数据 我有一个index.php和一个bootstrap表单,还有一个create.php,它在提交表单时在表单上执行Php 提交按钮是';不要把一切都发送出去,php,html,Php,Html,我的提交按钮没有发送所有表单数据 我有一个index.php和一个bootstrap表单,还有一个create.php,它在提交表单时在表单上执行echo 我遇到的问题是,没有一个包含用户输入的字段真正被发送到我的create.php,只有默认的Radio被发送 <?php ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8&q
echo
我遇到的问题是,没有一个包含用户输入的字段真正被发送到我的create.php
,只有默认的Radio
被发送
<?php
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<title></title>
</head>
<body>
<div id="form">
<form action="./create.php" method="post">
<img src="https://i.imgur.com/jDiqUAy.jpg" width="20%" heigth="20%">
<div class="form-group">
<label for="nameInput">Naam van uw kat</label>
<input type="text" class="form-control" id="nameInput" placeholder="Henkie">
</div>
<div class="form-group">
<label for="emailInput">Email address</label>
<input type="email" class="form-control" id="emailInput" placeholder="name@example.com">
</div>
<div class="form-group">
<label for="inputPassword">Wachtwoord</label>
<input type="password" class="form-control" id="inputPassword" placeholder="Bananen123">
</div>
<div class="form-group">
<label for="selectOptions">Kleur van uw kat</label>
<select class="form-control" id="selectOptions">
<option>Zwart</option>
<option>Wit</option>
<option>Oranje</option>
<option>Zwart met wit</option>
<option>Grijs</option>
</select>
</div>
<div class="form-check">
<p>Extras</p>
<input class="form-check-input" type="radio" name="hairRadio" id="hairRadio1" value="long" checked>
<label class="form-check-label" for="hairRadio1">
Lang
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="hairRadio" id="hairRadio2" value="short" checked>
<label class="form-check-label" for="hairRadio2">
Kort
</label>
</div>
<div class="form-check">
<input class="form-check-input position-static" type="checkbox" id="litterCheckbox" value="">
<label class="form-check-label" for="litterCheckbox">
Kattenbak
</label>
</div>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Verstuur</button>
</div>
</div>
</form>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
</body>
</html>
纳姆·范乌吉
电子邮件地址
瓦赫特伍德
Kleur van uw kat
兹瓦特
机智
奥兰杰
茨瓦特遇到了机智
格里斯
额外费用
冗长的
科特
卡滕巴克
维斯图尔
create.php
这是因为您没有为其他输入定义name属性!每个输入都需要name属性,以便其数据可以通过表单发送。要发送输入,需要name属性。输入的name属性缺失。加上它,应该可以解决问题所有表单字段都需要name
属性