- I want to select a item from listbox (say listbox 1) and just after selecting
- I want another list box (listbox 2) get data with the help of item selected in listbox 1.
List box 1 data:
<select>
<option value="1">AXC-202</option>
<option value="2">AXC-204</option>
<option value="3">AXC-206</option>
<option value="4">AXC-206</option>
</select>
Suppose if AXC-202 selected then listbox fill by query
$query = mysql_query("select from stats where sub = 1");//AXC-202
echo '<select name="Year">';
while ($row = mysql_fetch_array($query)) {
echo '<option value="'.$row['year'].'">'.$row['year'].'</option>';
}
echo '</select>';
All this I wants to be done on single page.