I create an array[]
entry of name and place is there any way if i select value
in select box
the country
of selected value will appear to the input field
value automatically.
for example I select Marjohn bebeloni
as select box value, then china
will automatic appear in the input field
<?php
$names = array('Ireneo Crodua' => 'Australia',
'Almads Bangal' => 'India',
'Rechard Canonigo' => 'America',
'Marjohn bebeloni' => 'China'
);
?>
<form action="post">
<p><label>Select Name</label>
<select>
<?php
foreach($names as $name => $place){
echo "<option>" . $name . "</option>";
}
?>
</select>
</p>
<p><label>Place</label><input name="place" value="" /></p>
</form>