well once you populate the select box with mysql data via php, you simply have an html select box, nothing more, nothing less, so you can then use JS to add that value to the text field by having the select box, call a function you write that places the value in the text field with the onchange function
something like this should get you rolling, don't cut and paste, it may work, but is off the top of my head and UNtested!!!
<script language="JavaScript1.2">
function changer(){
var value = document.formname.selector.options[document.formname.selector.selectedIndex].value;
document.formname.textfield.value = value;
}
</script>
<form name="formname">
<select name="selector" onchange="changer();">
option...
option...
populate with mysql/php
</select>
<input type="text" name="textfield">