RE: [PHP] Problem with arrays
| From: | Jay Blanchard | Date: | Fri, 25 Mar 2005 17:17:49 +0000 |
| Subject: | RE: [PHP] Problem with arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211585@lists.php.net to get a copy of this message | ||
[snip]
<form action="products.php" method="post">
<input name="position[pos][$value]" type="text"
id="position[pos][$value]" value="number 1">
<input name="position[pos][$value]" type="text"
id="position[pos][$value]" value="number 2">
<input name="position[pos][$value]" type="text"
id="position[pos][$value]" value="number 3">
</form>
Note that $value from position[pos][$value] is different in all 3
fields.
For each element of the array i want to update the value in the
database. For example, for each value of the position[pos][$value] i
want to update the database with the specific number.
Something like this:
$query = "UPDATE table SET value = 'number 1' WHERE id='$value'";
[/snip]
On Good Friday, when traffic is really slow, we have someone who wants
to post their problem over and over again.....cool....
Lets start simply, shall we?
http://www.php.net/print_r