When I test out your page with your data I can see that whatever ID is in the URL is the item that will be selected and added to the cart. For the price of the item you are just binding to the price from the recordset, $row_rsDetail['ProductPrice']. I can see that you are adding a size and sizePrice from different recordsets. It seems that you must be adding the additional price with a calculation of some type. I do not have your cart files though so I do not have the calculation that you are using to add the sizePrice to the price.
When I test it out like it is currently I can see the item change with the id, then when I add the item to the cart the item is added according to the id specified. I tried this with three different items and was able to get them to all show in the cart without issue.
I also noticed that out of the items I tested, 1, 2, and 20 only 2 had size selections available for it.