rmdort
09-11-2005, 05:10 PM
I am having a registration page here
http://ntudebatingsociety.org/iv/register.php
When a user select the No of teams, i use a for statement to display one table each for a team in the next page register2.php
Quote:
for ($i=1;$i<=$teams;$i++)
{
print'<p class=\"text\">Team ';echo"$i";print'</p><table border=1 class=\"tablestructure\">
<tr><td class=\"listtable\">Team Number</td><td><select name='.$teamselect.'[i]><option value=1>A</option>
<option value=1>A</option>
<option value=2>B</option>
<option value=3>C</option>
<option value=4>D</option>
<option value=5>E</option>
<option value=6>F</option>
<option value=7>G</option>
<option value=8>H</option>
<option value=9>I</option>
<option value=10>K</option>
</select></td></tr>
<tr><td class=\"listtable\">Member 1 Name</td><td><input type=text name=\"member1name\"></input></td></tr>
<tr><td class=\"listtable\">Accommodation</td><td><select name=accomselect[]><option value=1>Dormitory</option><option value=2>Other</option></select></td></tr>
<tr><td class=\"listtable\">Details</td><td><textarea name=detail[] cols=30 rows=5></textarea></td></tr>
<tr><td></td></tr>
<tr><td class=\"listtable\">Member 2 Name</td><td><input type=text name=\"member1name\"></input></td></tr>
<tr><td class=\"listtable\">Accommodation</td><td><select name=accomselect[]><option value=1>Dormitory</option><option value=2>Other</option></select></td></tr>
<tr><td class=\"listtable\">Details</td><td><textarea name=detail[] cols=30 rows=5></textarea></td></tr>
</table><br>';
}
After he clicks submit, i execute the page finish.php and i need all the selected Team Numbers[eg A,B,C etc] of all the teams as an array or something so that i can mail the details.
Is there any way to do this.. Can i pass the <select name= to an array> so that i can retrieve them in the next page using $_REQUEST['array'] ????
any help would be appreciated.
http://ntudebatingsociety.org/iv/register.php
When a user select the No of teams, i use a for statement to display one table each for a team in the next page register2.php
Quote:
for ($i=1;$i<=$teams;$i++)
{
print'<p class=\"text\">Team ';echo"$i";print'</p><table border=1 class=\"tablestructure\">
<tr><td class=\"listtable\">Team Number</td><td><select name='.$teamselect.'[i]><option value=1>A</option>
<option value=1>A</option>
<option value=2>B</option>
<option value=3>C</option>
<option value=4>D</option>
<option value=5>E</option>
<option value=6>F</option>
<option value=7>G</option>
<option value=8>H</option>
<option value=9>I</option>
<option value=10>K</option>
</select></td></tr>
<tr><td class=\"listtable\">Member 1 Name</td><td><input type=text name=\"member1name\"></input></td></tr>
<tr><td class=\"listtable\">Accommodation</td><td><select name=accomselect[]><option value=1>Dormitory</option><option value=2>Other</option></select></td></tr>
<tr><td class=\"listtable\">Details</td><td><textarea name=detail[] cols=30 rows=5></textarea></td></tr>
<tr><td></td></tr>
<tr><td class=\"listtable\">Member 2 Name</td><td><input type=text name=\"member1name\"></input></td></tr>
<tr><td class=\"listtable\">Accommodation</td><td><select name=accomselect[]><option value=1>Dormitory</option><option value=2>Other</option></select></td></tr>
<tr><td class=\"listtable\">Details</td><td><textarea name=detail[] cols=30 rows=5></textarea></td></tr>
</table><br>';
}
After he clicks submit, i execute the page finish.php and i need all the selected Team Numbers[eg A,B,C etc] of all the teams as an array or something so that i can mail the details.
Is there any way to do this.. Can i pass the <select name= to an array> so that i can retrieve them in the next page using $_REQUEST['array'] ????
any help would be appreciated.