Possible Duplicate:
option in dropdown box that changes an input box
I am building a scheduler using php-mysql. I have a drop down list for course code and an input box that displays automatically the subject name of the selected course code from the drop down list. Any one can help me with this?
This drop down list should be dynamically getting data from the database and what ever Course Code I select in this list should appear in the input box.
How do I code this in php?
<select name="cCode">
<option>Subject Code 1</option>
<option>Subject Code 2</option>
</select>
The subject name of the course code I selected in the list should appear in an input box.
<input type="text" name="sSubject" disabled value="Subject Name"/>