пример на php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
error_reporting(E_ALL);
?>
<form action="" 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?>" /><br />
<?
}
}
?>
<input type="text" name="input_<?= $index+1 ?>" value="" /><br />
<input type="submit" value="send" />
</form>