Fill In Multiple Selection Boxes From One Selection Box Selection
I have a selection box at the top of my web site and then I have a bunch of rows printed out into a table from a MySQL database below that selection box.
Each one of these rows has a selection box in the first column.
I want the selection box that is at the top of all of these rows of data to fill the same value in as it if I select a value from it.
So if I select "Apples" from the selection box at the top of the table of data rows then all of the selection boxes in the table below would fill in with Apples.
Here is the code that each one of the selection boxes in the table has.
PHP Code:
<select name="inspector[<?php echo $row["id"]; ?>]" class="smallInput">
<option value=""></option>
<?php
$result1 = mysql_query("SELECT * FROM users WHERE account_type='Inspector' ORDER BY username ASC");
while($row1 = mysql_fetch_array($result1)) {
?>
<option value="<?php echo $row1["user_code"]; ?>"><?php echo $row1["username"]; ?></option>
<?php
}
?>
</select>