I think this is the way to go, however, I'd do it slightly differently:
No labels used, but you'll get the idea:
<?php
if(isset($_POST['sub_it'])){
print_r($_POST);
}
?>
<form method="post">
<input type="date" name="date[]" />
<input type="text" name="versus[]" />
<input type="radio" name="ha[0]" value="home" checked="checked" />
<input type="radio" name="ha[0]" value="away" />
<input type="date" name="date[]" />
<input type="text" name="versus[]" />
<input type="radio" name="ha[1]" value="home" checked="checked" />
<input type="radio" name="ha[1]" value="away" />
<input type="date" name="date[]" />
<input type="text" name="versus[]" />
<input type="radio" name="ha[2]" value="home" checked="checked" />
<input type="radio" name="ha[2]" value="away" />
<input type="submit" value="go" name="sub_it" />
</form>
This can be easily created with a php for loop:
$groups = "";
for($x=0;$x<6;$x++){
$groups .= "<input type=\"date\" name=\"date[]\" />\n
<input type=\"text\" name=\"versus[]\" />\n
<input type=\"radio\" name=\"ha[$x]\" value=\"home\" checked=\"checked\" />\n
<input type=\"radio\" name=\"ha[$x]\" value=\"away\" />\n";
}
....
echo $groups;
diafol
Rhod Gilbert Fan (ardav)
7,796 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080