eaposztrof wrote:sorry.. nice, but i can't generate the "input" lines,
That's only an example and I quite sure somehow you have to
generate the input. Your example
eaposztrof wrote:echo "<form action="" method=post>\n";
echo "<input type=text name="asd1" value="".read_config("asd.php","asd1").""\n";
echo "<input type=text name="asd2" value="".read_config("asd.php","asd2").""\n";
//...
is straight forward and so is mine.
The idea is to give the elements names so they're arranged as an array when php parses the request parameters.
And if you send a static form to the browser
Code: Select all
<form action="#" method="post">
<div>
<input type="text" name="asd[asd1]" value="<?php echo read_config('asd.php', 'asd1'); ?>" /><br />
<input type="text" name="asd[asd2]" value="<?php echo read_config('asd.php', 'asd2'); ?>" /><br />
<input type="text" name="asd[asd3]" value="<?php echo read_config('asd.php', 'asd3'); ?>" /><br />
<input type="text" name="asd[asd4]" value="<?php echo read_config('asd.php', 'asd4'); ?>" /><br />
<input type="submit" />
</div>
</form>
it will make no difference. The browser nevers cares about how the html it gets was created. It justs sends the parameters according to the form code it gets. And on the other hand php does not care "why" parameters are sent with a http request. It just parses them according to a simple ruleset. In this case php will put the values in $_POST['asd']['asd1'], $_POST['asd']['asd2'] .... and the processing part of the script will still work.