It's all rather subjective, what's bad practice and what's not.
There is nothing in HTML 4.0 that insists on where the form tag is placed as long as the containment hierarchy is correctly defined.
What standard are you coding for?
If you're coding for valid XHTML, then probably best to let people know in your first post.
Having seen this ...
echo '<tr><td valign="top">'.$name[$i].'</td><td><input type="text" name="add[]" size="30" /><br />& nbsp ;</td></tr>';
... in your code, with the space-filling <br />& nbsp ; that would be considered by purists as 'bad' practice, I wasn't sure.
For me it's what works and what doesn't, and what standard I'm coding for. For HTML 4.0, my solution is fine.
EDIT ... the & nbsp ; 's weren't showing up in my post ... hence a minor confusion.