+1  A: 

Use +1 instead:$_SESSION['cart'][$product_id] = $_SESSION['cart'][$product_id] + 1; should do the trick.

fredley
A: 

Turning off register_globals would fix it. You shouldn't be using it anyway, it presents a major security problem (and quite easily exploited in some cases).

Delan Azabani