购物车不使用会话更新php

I have made a simple cart, my issue is when I want to update the quantity of a single product. I use the post method to do it. When I add in the quantity on the correct item and click on update, it does the update successfully but any other product their quantity is updated as well. Please help.

<?php

if(isset($_POST['Update']))
{
     if(isset($_POST['prod_id']))
     {
     $myid = $_POST['prod_id'];
     if (in_array($myid,$_SESSION['cart'])) 
    {
     $key = array_search($myid, $_SESSION['cart']);
     $value_qty = "qtyval".$key;
     $_SESSION[$key] = $_POST[$value_qty];
     $message=$_SESSION[$key];
     echo '<script>alert("'.$message.'")</script>';
     }
  } 
}
?>
<?php
foreach ($_SESSION['cart'] as $key_value => $listitem)
{
$sql="SELECT * FROM products where id = '$listitem'";
$result_set = $database->query($sql);
while ($row=$database->fetch_array($result_set)){
?>


<div class="basket_block" id="basket_block">
  <div class="item_block_remove" id="item_block_remove"><a href="basket.php?remove=<?php echo $key_value; ?>">Remove</a></div>
  <div class="item_block" id="item_block">Name: <?php echo $row['Title_of_Message']; ?><br />
        Description <?php echo $row['Description']; ?> 
    </div>
  <div class="item_qty" id="item_qty"><form action="" method="POST" enctype="multipart/form-data" name="frmqty">

  <input type="text" name="<?php echo (string)'qtyval'.$key_value; ?>" size="3" style="border-radius: 15px;text-align: center;" value="<?php 
  if(isset($_POST['Update']))
  {
    echo $_SESSION[$key];
  } 
  else
  {
    echo $_SESSION[$key] = 1;
  }

  ?>" />
  <input type="hidden" name="prod_id" id="prod_id" value="<?php echo $row['id']; ?>" />

 <input type="submit" value="Update" name="Update" style="border:none;cursor:pointer;padding-top:10px; background-color:transparent;" />

  </form></div>