Good Day

I am creating my first php shopping cart and have been struggling to get the duration select menu to work. Below is the code I am working on. If anyone could please point out were I am going wrong or see anything I have missed it will be greatly appreciated. I have been able to use the select menu in the shopping cart but when there is more then one product in the cart it takes the same price of the first product added to the cart.

Code:
This is php part telling it what to do.....
Code:
<?php
$duration = "";
$price_to_adjust = "";
if (isset($_POST['price_to_adjust']) && $_POST['price_to_adjust'] != "") {
// execute some code
$price_to_adjust = $_POST['price_to_adjust'];
$duration = $_POST['duration'];
foreach ($_SESSION["cart_array"] as $each_item) { 
$item_id = $each_item['item_id'];
$sql = mysql_query("SELECT * FROM products WHERE id='$item_id'");
while ($row = mysql_fetch_array($sql)) {
$price = $row["price"];
$price2 = $row["price2"];
$price3 = $row["price3"];
$price4 = $row["price4"];
} 
if ($duration == "price") { $duration = $price; }
if ($duration == "price2") { $duration = $price2; }
if ($duration == "price3") { $duration = $price3; }
if ($duration == "price4") { $duration = $price4; }


$i = 0;
foreach ($_SESSION["cart_array"] as $each_item) { 
$i++;
while (list($key, $value) = each($each_item)) {
if ($key == "item_id" && $value == $price_to_adjust) {
$price_value = array("price" => $price, "price2" => $price2, "price3" => $price3, "price4" => $price4);
// That item is in cart already so let's adjust its quantity using array_splice()
array_merge_recursive($each_item, $price_value);
} // close if condition
} // close while loop
}
}
}
?>
Here is the select menu that is outputting to the cart....

Code:
$cartOutput .= '<td><form class="form" action="cart.php" method="POST">
<select name="duration">
<option value="price">1 Day</option>
<option value="price2">2 Days</option>
<option value="price3">3 Days</option>
<option value="price4">4-7 Days</option>
</select>
<input name="changeBtn' . $item_id . '" type="submit" value="Update" />
<input type="hidden" name="price_to_adjust" value="' . $item_id . '"/>
</form></td>';
Thanks in advance for assisting