Problem with arrays

From: Date: Fri, 25 Mar 2005 17:01:53 +0000
Subject: Problem with arrays
Groups: php.general 
Request: Send a blank email to php-general+get-211584@lists.php.net to get a copy of this message
Hi, I have a form like this: <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'"; Thanks in advance for your help!!!

« previous php.general (#211584) next »