пример на php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<form action="some.php" method="GET">
<?php
$index = 0;
foreach ($GET as $key => $value) {
if (preg_match('/$input_(<?index>\d+)^/uis', $key, $matches) {
$index = max($index, $matches['index']);
?>
<input type="text" name="<?=$key?>" value="<?=$value?>" />
<?
}
}
?>
<input type="text" name="input_<?= $index+1 ?>" value="" />
<input type="submit" value="send" />
</form>