User fills out a web form containing about a dozen or so combo boxes. As each comboBox has its options filled from values contained in a database, this limits what the user can input. However, as we know this can be bypassed, hence the need for validation even on a preset data set. So after I've "cleaned" the input, I need to make sure the values are valid before adding a new row into the database.
Currently, I'm thinking of just doing the following (except with 17 tables):
SELECT * FROM t1,t2,t3 WHERE t1.id = '{$clean['a']}' AND t2.id = '{$clean['b']}' AND t3.id = '{$clean['c']}'
How efficient would that be? Or would there be a better way? This isn't a query ran on every page, only during registration. And though this wouldn't tell me which field is invalid, it would tell me if all values are contained in the database and thus valid or not.