As part of an online store, I have a dropdown box where the user selects a size. If the user selects size L then the 'add to cart' button needs to link to a page different than if the user selected size M.
I figured out that I can only grab the selected value for PHP to process if it was submitted, i.e., through a form. Then I could do something like this:
You can have a bank of buttons (like radio buttons). However, I'm unsure why you'd want to link to a different 'page'. I'd have thought that size was just a property of the product, just some piece of data to be carried on with the product_id.
Of course, most baskets are 'ajaxed', so that you don't lose the page you're on and the item appears 'magically' in the basket, e.g. "BASKET Items: 3"
The HTML given will give you radio buttons, which visual-wise may not be what you want, BUT there are many, many CSS snippets that can give them the appearance of buttons. Sorry, can't help further off on vacation.