From The Blog

Don't put a form inside a table

2 February 2012, in HTML

Don't put a form inside a table, instead put table inside form

Wrong approach:

<table>

<form id="form-id" method="POST" action"action.php">

<tr><td><!--  form inputs --> </td></tr>

</form>

</table>

 

Correct approach:

        <form id="form-id" method="POST" action"action.php">

<table>

<tr><td><!--  form inputs --> </td></tr>

</table>

</form>

 

If you put the form inside the table, the html parser will close the form before inserting the table tag.



Post a Comment