Basically, if an error comes up (for whatever reason), I want the initially entered values to re-appear, so that the user doesn't have to refill in the fields. This works just fine for my NON-array inputs, but I'm having trouble with making the Array values re-appear. Here's what I have:
In php:
$contacts = "";
$contacts = $_POST['contacts'];
In the html:
<tr>
<td><input name="contacts[]" type="text" id="contacts[]" value="<?php print "$contacts"; ?>" size="30" maxlength="50" /></td>
<td><input name="contacts[]" type="text" id="contacts[]" value="<?php print "$contacts"; ?>" size="30" maxlength="50" /></td>
<td><input name="contacts[]" type="text" id="contacts[]" value="<?php print "$contacts"; ?>" size="30" maxlength="50" /></td>
<td><input name="contacts[]" type="text" id="contacts[]" value="<?php print "$contacts"; ?>" size="30" maxlength="50" /></td>
</tr>
Instead of putting the contact names back in the fields, my output result in this:
Array Array Array Array