I have two drops down and I am able to display the records in one dropdown from a database. I am getting the second drop down list bank.I have to display same records in my second drop down but it is not displaying. If I delete first drop down then records are displaying in second drop down.I haven't change any think just copy paste the code.Would you help me in this?
<?php
$sql_emails="SELECT * FROM request";
$result_emails = $conn->query($sql_emails);
//first drop down
?>
<select class="selectpicker" name="first" data-live-search="true">
<option style="color:#bbb;" value="" disabled selected>Select emails</option>
<?php while($row = mysqli_fetch_array($result_emails)) { ?>
<option value="<?php echo $row['Email'];?>"><?php echo $row['Email'];?></option>
<?php } ?>
</select>
<?php mysqli_data_seek( $result_emails, 0 ); ?>
<select class="selectpicker" name="second" data-live-search="true" id="learner-emails">
<option style="color:#bbb;" value="" disabled selected>Select emails</option>
<?php while($row = mysqli_fetch_array($result_emails)){ ?>
<option value="<?php echo $row['Email'];?>"><?php echo $row['Email'];?></option>
<?php } ?>
</select>