This is a very simple shopping cart that stores the product ids in a hash table. The keys are the product id and the values are the quantity of that particular product.
To store information between pages we can use the $_SESSION superglobal variable, by using an element of the array like this: $_SESSION['cart'] - this is where our cart will be stored.