I have two table in database. in table their is my all divisions which are shown in dropdown options. In second table, i submit my division name in division field. I want value in division field show as a default value in dropdown.here is my code..
here is my first query by which all division are comes
$all_customers = mysql_query("select * from `supp_customers`");
<select name="division" id="c_name" required class="form-control" onchange="my_function(this,<?php echo $users['id']; ?>)">
<option value="">All Divisions</option>
<?php while($customer = mysql_fetch_array($all_customers)){ ?>
<option value="<?php echo $customer['name']; ?>"><?php echo $customer['name']; ?></option>
<?php } ?>
</select>
and my second query
$pro_qry = mysql_query("SELECT * FROM `supp_average_notes` where `id`='$id'");
$div_query = mysql_fetch_array($pro_qry);
$dive_query['division'];
?>
i Want to set $div_query['division'] as a default in dropdown. How it can be possible