Values from forms
| From: | Beauford.2005 | Date: | Mon, 04 Aug 2003 19:09:06 +0000 |
| Subject: | Values from forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158205@lists.php.net to get a copy of this message | ||
Small brain cramp here.
I have the following form and having problems retrieving the values from
it.
<FORM ACTION="teams-write.php" action="post" name="inputs">
<input type=hidden name=count value="<? echo $number; ?>"> // $number
gets inputted from another form (this works)
<? for($i = 1; $i < $number + 1; $i++) { ?>
input type=text name="team<? echo $i; ?>" SIZE="10">
<? } ?>
This is teams-write.php: The problem I am having is getting the values
inputted in the above form in the for loop below. If I just echo $team1,
$team2, etc. they are there, I just can't figure out how to get the
values inputted into my database. In the loop below, what would I put in
the second values section to get the values of $team1, $team2, etc.
for($i=1; $i < $count + 1; $i++) {
mysql_query("insert into manager (idn, name) values
('$i','???????')");
}
TIA