If else around a submit button

Hope someone can help with this.

I have a few pages as part of a shopping cart, where some optional extras can be offered.

They are in the following order:

Paintwork (can apply to any product)
Cushions (can only apply to chairs)
Glasstop (can only apply to tables)

The logic I would like around the submit button on the Paintwork page is:

If Cushions is not empty go to cushions.php
else if Glasstop is not empty go to glasstop.php
else go to

Where Cushions and Glasstop are the fields in the database table.

Hope that makes sense. Thanks.

Actually, I realised the submit button is working, and the issue was with a basic link that people click on if they don’t want the option. So I can probably just use a couple of links each inside a show if… statement.