php - Display results on combobox by selecting a value on another combobox -
i have problem in project. have these categories:
football basketball tennis
and these sub categories:
super league super league b euroleague serie
i have categories , sub categories in phpmyadmin db. have code now, display these two, in 2 different comboboxes, via queries db:
<?php $category = mysql_query("select * katigories order id_katigoria"); echo "<select name='katigoria'>"; echo "<option selected='selected' value='0'> Επιλογή κατηγορίας! </option>"; while($values = mysql_fetch_assoc($category)) { echo "<option value='$values[id_katigoria]'>".$values['katigoria']."</option>"; } echo "</select>"; ?>
and
<?php $category = mysql_query("select * upokatigories order id_upokatigoria"); echo "<select name='upokatigoria'>"; echo "<option selected='selected' value='0'> Επιλογή υποκατηγορίας! </option>"; while($values = mysql_fetch_assoc($category)) { echo "<option value='$values[id_upokatigoria]'>".$values['katigoria']."</option>"; } echo "</select>"; ?>
so far good. problem want select first 1 basketball, , want see euroleague second combobox.
i don't know js or jquery, believe between 2 of them answer looking for. right?
please ideas, continue, or suggestions, read , look?
p.s. found similar here, c# or/and python..so, hope not repeating other questions
you need jquery makes ajax call server bring new dropdown list. see here: http://www.codingcereal.com/2009/09/autopopulate-select-dropdown-box-using-jquery/
Comments
Post a Comment