[英]How to send multiple text field values to next pho page when the text field is created using while loop?
How do I pass multiple text field values of a form which were created using a while loop to another page?如何将使用 while 循环创建的表单的多个文本字段值传递到另一个页面?
echo”<form method=\”POST\” action =\”store.php\”>”;
While($result = mysqli_fetch_row($exec))
{
echo $result[0].” “ .$result[1].” “;
echo “<input text =\”type\” name=\” marks\”>”;
}
echo “<input type=\”submit\”>”;
echo “</form>”;
The above code works fine but when the loop creates multiple text fields and when I submit the form only latest is sent to store.php.上面的代码工作正常,但是当循环创建多个文本字段并且当我提交表单时,只有最新的被发送到 store.php。 My question is how to send all values.?
我的问题是如何发送所有值。?
You can use Array notation.您可以使用数组表示法。 Which contain all value as an array
其中包含所有值作为数组
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.