Obviously its adding 1 record because you have 1 sql statement to insert and you are not looping it either. In your html form, you should have different input elements name. For example, you can concatenate $i value with textbox name to give it a unique name. When the page is submitted, you can loop through the posted values and insert into the table. Just a small example.
<?php //page1.php
for ($i=1;$i<10;$i++){
echo "<form name=update method=post action=page2.php>";
echo "Name : <input type=text name=name_".$i.">\t";
echo "Marks1: <input type=text name=test1_".$i."><br />";
}
echo "<input type=submit name=submit value=submit>";
?>
<?php //page2.php
for ($i=1;$i<10;$i++){
$name = "name_".$i;
$new_name=$_POST[$name];
$marks = "test1_".$i;
$new_marks=$_POST[$marks];
//database connection string
$query="insert into table (col1,col2) values ('$new_name','$new_marks')";
mysql_query($query);
}
echo "All names and marks are entered into the table !!";
?>
Hope it helps.