Values from a submited form is automatically treated as an array if you add "[]" to the fields' name. As in
PHP Code:
<form ...> Field 1 <input type="text" name="my_field[]"> Field 2 <input type="text" name="my_field[]"> Field 3 <input type="text" name="my_field[]"> Field 4 <input type="text" name="my_field[]">
<input type="submit"> </form>
On the page that receive the form:
PHP Code:
<?php
$fields = $_POST['my_field']; echo "<pre>"; print_r($fields); echo "</pre>";
/* This will output the $field variable, just to show you that it is an array. It will look something like
Array ( [0] => "first value...", [1] => "seccond value...", [2] => "third value...", [3] => "fourth value..." )
*/
?>
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
|