Avrei necessità di far si che il menù a discesa che si crea dalla seconda query, quella dei comuni, si popoli a seconda della selezione della prima che contiene le categorie... qualcuno sa aiutarmi?
query
Codice PHP:
// Make the select list for the category options
$categories[] = mosHTML::makeOption( '0', _ALBERGHI_ALL_CATEGORIES );
$query = "SELECT id AS value, name AS text FROM #__categories WHERE section='com_alberghi' ORDER BY ordering";
$database->setQuery( $query );
$database->Query( );
$categories = array_merge( $categories, $database->loadObjectList() );
$categoryList = mosHTML::selectList( $categories, 'catid', 'class="inputbox"', 'value', 'text', $searched_catid );
// Make the select list for the comune options
$comune[] = mosHTML::makeOption( '0', _ALBERGHI_SEARCHCOMUNE );
$query = "SELECT comune AS value, comune AS text FROM #__alberghi GROUP BY comune ORDER BY comune ASC ";
$database->setQuery( $query );
$database->Query( );
$comune = array_merge( $comune, $database->loadObjectList() );
$comuneList = mosHTML::selectList( $comune, 'comune', 'class="inputbox"', 'value', 'text', $searched_comune );