Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple form within one HTML table

Out of a really long product list I am creating a table. Each row should be possible to update. HTML is not valid if I put multiple forms within one table. A solution would be to create for each row a single table, but the format would be really ugly.

I would like to make this:

<table>
<tr><form><td><input type=\"text\" name=\"name\" value=\"".$row['name']."\" /></td>\n";
</td><td></td>....<td><input type=\"submit\" name=\"Submit_btn\" id=\"Submit_btn\" value=\"Update\"></td></tr></form>
<tr><form><td></td><td></td>....<td><input type=\"submit\" name=\"Submit_btn\" id=\"Submit_btn\" value=\"Update\"></td></tr></form>
.
.
.
</table>

It is not valid. What I could do?

like image 978
Manuel Avatar asked Apr 10 '26 02:04

Manuel


1 Answers

Use one form around the entire table.

Filter out the data you don't need after it gets to the server.

like image 72
Quentin Avatar answered Apr 11 '26 14:04

Quentin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!