You want the form to show a new textbox depending on how many names are being registered, I'm assuming you're getting the number from another form or link, I just used 5 here:
<form>
<?php
$num=5;
for($i=1;$i<=$num;$i++)
{
echo "<input type=\"text\" name=\"name".$i."\"><br />";
}
?>
</form>
is that what you were going for?