take this code
PHP Code:
<select name="FileNo" id="select2" onChange="change_title();"> <? $query="SELECT * FROM pationts"; $result=mysql_query($query) or die("error: " . mysql_error()); while($row=mysql_fetch_array($result)) { echo "bla"; ?> <option value="<?php echo $row['FileNo'] ; ?>"><?php echo $row['FileNo'] ; ?></option> <? } ?> </select>
he above code is for list i need to select value from it and when i select value we must change vale on the below code
Code:
PHP Code:
<input name="PationtName" type="text" id="title"/>
the result is :-
when i select FileNo:111 we print on PationtName: 111
this wrong we must print name of pationt who FileNo is 111
|