
Originally Posted by
davide78

Originally Posted by
xav0989
Do you want to store the option selected as well, or is it okay if it disappears after use?
Yes, I would like the option selected be stored in the textbox after the use...
This doesn't answer xav's question.
JS would be a more efficient choice, as it would reduce a round-trip. You'd still want the PHP handler, for those browsers that have JS disabled or don't support JS.
HTML Code:
<form ...>
<select name="Room" onchange="roomChange(this);">
...
</select>
<input name="RoomName" value="<?php isset($_REQUEST['RoomName']) && echo $_REQUEST['RoomName']; ?>"/>
</form>
<script type="text/javascript">
function roomChange(roomField) {
roomField.form.RoomName.value = roomField.value;
}
</script>