$r=mysql_query("select * from $table");
$rows = mysql_num_rows($r);
echo"<form action=test.php?rows=$rows method=POST>",
for($i=0; $i<$rows; $i++){
$f=mysql_fetch_array($r);
echo"
<input type=text name=name".$i." >
<input type=hidden name=id".$i." value=$f[id] > ";
}
echo"
<inbut type=submit></form>";