简体   繁体   English

使用 while 循环创建文本字段时,如何将多个文本字段值发送到下一个 pho 页面?

[英]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.

相关问题 单击提交按钮后如何将表格行值传递到输入文本字段中的下一页 - how to pass table row values to next page in input text field after clicking submit button 从数据库中获取的数据存储在文本字段中时,如何自动移动下一页 - how to automatically move next page when data fetched from database is stored in text field 在while循环中,文本字段未添加到数组中 - Text field not adding to an array when within a while loop 在while循环中回显文本字段值 - echoing text field value in a while loop 如何在JavaScript的while循环中检索文本字段的值? - How to retrieve value of text field inside while loop with JavaScript? 使用while循环时如何将文本放在图像旁边,并且每次迭代都会添加其他组件 - How to put text next to images when using while loop and additional components are being added on each iteration 从php中的文本字段读取多个值 - reading multiple values from text field in php 如何通过Magento中的文本字段为属性分配多个值? - how to assign multiple values to an attribute through text field in Magento? 如何使用PHP中的post方法获取循环文本字段的值 - How to get the value of a loop text field using post method in php Guzzle:如何发送文件和第二个文本字段? - Guzzle: how to send a file and a second text field?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM