As i tryed to explain to you before, once the output is sent to the client (the browser presumably) then you can't execute any PHP on it.
The only thing you can do is put a submitbutton next to the dropdown.
Then post the form to itself, proces the value from the dropdown, change the value for the textbox with PHP and reload the form.
So the form needs to go back to the server to change the textfield.
so inside the formtag, your action needs to be
echo ('<form action="' . $_SERVER['PHP_SELF'] . '" ...>');
and inside the php page:
echo '<input type=text name="bla" value="' . $_POST['dropdown'] . '">';
so on first load, or if no value isselected, the textfield is empty. If a value if selected from the dropdown and the form is posted, then the textfield will contain the selected value.
Or, you first need to run a select, based on the selected alue and then show the details. Like
$sql="select var from table where shcoolID =" . $_POST['dropdown'] ;
echo '<input type=text name="bla" value="' . $row['shooldetails'] . '">';
But an onchange isn't possible (unless you would try some other clientside scripting (clientside vb-script or so) but i think the objective is to make it truely universal, so you need the submitbutton and server side processing