Display a dropdown of only some particular services

Hello!

I am trying to do something and I’m not sure if I am on the correct way.

I offer some services, and each service can be booked (and payed) for 15-30-45 minutes.

so I’ve created some services like these:

1- Business Assitance 15min

2- Business Assitance 30min

3- Business Assitance 45min

4- Legal Assitance 15min

5- Legal Assitance 30min

6- Legal Assitance 45min

then I am looking to create pages for these services, but not one for each. I want to have, following the example, just a page for Business Assistance and another page for Legal Assistance.

In these pages I’d like to display something like the basic “make an appointment” page, but in which you have the services dropdown that display only the Business services if you are in the Business Page.

I thought to achieve this, assigning the Business page as the service page to all the 3 Business Services.

In this way I’ve managed to query the services based on the current page id, in order to get only the services which have this page set as “page”.

I’ve built this function which does this and works fine:

function get_current_page_services() {

global $wpdb, $post;

$results = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "app_services" . " WHERE page = ".$post->ID." ");

return $results;

}

the problem now is that I’m not sure how to build up the dropdown..

can anyone help me out?

Thanx!

Andrea