When I add the product twice, it keep displaying in a new line, with new quantity. I want the quantity to update. here's the code:

Code:
<?
include "functions.php";
if(!$_SESSION['logged']){die();}
$_POST['taxes']=str_replace('undefined,','',$_POST['taxes']);
if(empty($_SESSION['products']))$_SESSION['products']=array();

	if($_POST['action']=='add'){
	$_POST[$qty]=str_replace(',','.',$_POST[$qty]);
...