simple really...pass the form back to the server and create the SQL string by taking the form variables and plugging them in. It will get a little trickier if you are using dopdowns with multiple selects (more than one option can be chosen) but the basic one is:
$SQLGetData = 'select ' & $fname & ',' & $lname & 'from myTable'
where $fname and $lname are the dropdowns values...
Basically you just need to concatenate the values to the SQL string and then execute...
hth
Bastien