add item into add cart
<p>I'm trying to add product into add cart. Please tell me what is the best way.
My mess code is.</p>

<pre><code>if(isset($_SESSION['id'])) {
    echo "IF part";
     $_SESSION['id'] = $_SESSION['id'] + $_SESSION['id'];
     $k = $_SESSION['id'];
    // store session data
$_SESSION[$k]['product_name']=$_REQUEST['product_name_value'];
$_SESSION[$k]['product_price']=$_REQUEST['product_price_value'];
$_SESSION[$k]['shop_name']=$_REQUEST['shop_name_value'];
$_SESSION[$k]['Quantity']=$_REQUEST['selquantity'];
$_SESSION[$k]['color']=$_REQUEST['txtcolor'];
$_SESSION[$k]['Size']=$_REQUEST['selsize'];
$_SESSION[$k]['Product_Type']=$_REQUEST['selproducttype'];
$_SESSION[$k]['Remarks']=$_REQUEST['Remarks'];
$_SESSION[$k]['final_price']=$_REQUEST['final_price_value'];
$_SESSION[$k]['txturl']=$_REQUEST['txturl'];

}else {
    echo "else part";
    $_SESSION['id'] = 1;
    // store session data
    $_SESSION[$k]['product_name']=$_REQUEST['product_name_value'];
    $_SESSION[$k]['product_price']=$_REQUEST['product_price_value'];
    $_SESSION[$k]['shop_name']=$_REQUEST['shop_name_value'];
    $_SESSION[$k]['Quantity']=$_REQUEST['selquantity'];
    $_SESSION[$k]['color']=$_REQUEST['txtcolor'];
    $_SESSION[$k]['Size']=$_REQUEST['selsize'];
    $_SESSION[$k]['Product_Type']=$_REQUEST['selproducttype'];
    $_SESSION[$k]['Remarks']=$_REQUEST['Remarks'];
    $_SESSION[$k]['final_price']=$_REQUEST['final_price_value'];
    $_SESSION[$k]['txturl']=$_REQUEST['txturl'];
}
</code></pre>

<p>I'm trying to add these product details into array.
thanks</p>
