<input type ="hidden"/> php/html 的问题
Problem with <input type ="hidden"/> php/html
我目前遇到的问题是隐藏的“var”输入类型的值不存在:(
<form id ="bewerbung" name = "bewerbung" action="./edit" method="POST">
<div class="form-group">
<input type="hidden" value="Supporter" id ="type" name="type" />
<button type="submit" value="Submit" class="form-control-submit-button">Bewerbung</button>
</div>
编辑页面:
if (isset($_POST['type'])){
echo "set";
}else {
echo "not set";
}
输出:未设置:/
感谢@Aaron,最终的解决方案是在动作的末尾添加一个“/”。
就像:
<form method="POST" action="./edit/">
我目前遇到的问题是隐藏的“var”输入类型的值不存在:(
<form id ="bewerbung" name = "bewerbung" action="./edit" method="POST">
<div class="form-group">
<input type="hidden" value="Supporter" id ="type" name="type" />
<button type="submit" value="Submit" class="form-control-submit-button">Bewerbung</button>
</div>
编辑页面:
if (isset($_POST['type'])){
echo "set";
}else {
echo "not set";
}
输出:未设置:/
感谢@Aaron,最终的解决方案是在动作的末尾添加一个“/”。 就像:
<form method="POST" action="./edit/">