I've got a variable amount a text boxes. When I POST my form I want to be able to loop through them all
while ($t <= $tn) { echo $_POST['team_name_\$t\']; $t++; }
This does not work. How else can I do it?
Make the textareas, or whatever they are, be an array
<textarea name="team_name[]" >
You can even put indices if you need to.
Now you've got an array: $team_name = $_POST['team_name'];
foreach($team_name as $i => $v) { print "$i: $v<br />"; }
Could work, I've got a bunch textbox's and for each one i'm going to insert into a SQL DB
So how can I get serval>??
foreach($team_name_ as $a => $b, team_short_name_ as $c => $d) {
???