Duplicate queries when refreshing page

Now I know this problem of mine may be due to a design flaw but none the less I want to solve it.

Basically its a shopping cart system. A user will click “Add to Cart” and the id of that product will be passed to another page where it will be used to query that products information into a table.

These items in the cart are temporary and based on sessions. So when a user clicks add to cart again, another product table is popped into the page below the last product table and so on.

Every time I refresh the page all the products in the cart are duplicated and added below the originals.

My brain is fried due to getting the first bit to work so I can not really figure out how to go about fixing this.

Anyone have any ideas?

Thanks!

You should have a redirect page so that it doesn’t refresh the query and keep adding new ones. :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service