HTML代码在这里变量值不能被分配到另一个可变
某些错误与在PHP代码
<html>
<head><title>Hello
</title></head>
<body>
<form id="cool" name ="form" action ="hi.php">
<input type ="text" name="m1" value="m1"/>
</br><input type ="text" name="m2" value="m2">
</br><input type ="text" name="m3" value="m3">
</br><input type ="text" name="m4" value="m4">
</br><input type ="text" name="m5" value="m5">
<input type="submit" >
</form>
</body>
</html>
环路这是PHP代码,它说在第6行未定义索引,在这里MEM越来越值M1,M2,M3,M4,但提取MEM值不工作
<?php
for ($i = 1; $i < 5; $i++) {
$mem = 'm' . $i;
$m = $_POST[$mem];
print " The member is" . $m . "</br>";
}
?>
谢谢您指定的HTML表单代码。 – nlips
添加方法=“发布”在您的窗体标签 –