<select size="1" name="pcName" onchange="disable_other(form1.pcName,form1.add_name,form1.add,form1.update);">
<?php
$sql = "SELECT Cabin_PCName,Cabin_Location,Cabin_IP FROM Cabin
ORDER BY Cabin_PCName desc";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
if($pcName==$row[0]){
echo "<option value='$row[0]' selected>".$row[0]."</option>" ;
}else{
echo "<option value='$row[0]'>".$row[0]."</option>" ;
}
}
?>
</select>
<input type="text" name="tvLocation" value="<?php echo $tvLocation?>" size="20">
I would like display the $row[1] (i.e. Cabin_Location from Cabin) in the text field <tvLocation>everytime user change the select value. How can I make in that ?
Thankz for replying.