简体   繁体   中英

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?

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. My question is how to send all values.?

You can use Array notation. Which contain all value as an array

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM