如何显示数据列表标签但是将实际值提交给数据库?
<div class="form-group">
<label for="reg_input">Parent Name</label>
<input list="parentName" name="parentsName" id="parentsName" class="form-control">
<datalist style="color: #FFF" id="parentName">
<?php
$pa="select * from parents";
$par=mysql_query($pa);
while ($childrens=mysql_fetch_array($par)) {
?>
<option value="<?php echo $childrens['UserName'];?>" data-value="<?php echo $childrens['UserID'] ?>"></option>
<?php
}
?>
</datalist>
</div>