What am trying to do is when i select from Switch field I want Vendor to auto populate with $name. Below is the code that i am useing
[code=php] <label><strong>Switch:
<select name=”Switch” id=”Switch” >
<?php
while ($row_getSwitches = mysql_fetch_array($getSwitches))
{
$id = $row_getSwitches[‘Switch’];
$name = $row_getSwitches[‘Vendor’];
print “<option value=$id”;
if ($var == $id)
print ” selected”;
print “>$id–$namen”;
}
?>
</select>
</strong></label>
<strong>
<label>Person:
<select name=”Person” id=”Person”>
<?php
while ($row_getPerson = mysql_fetch_assoc($getPerson))
{
print “<option value='”.$row_getPerson[‘Person’].”‘>”.$row_getPerson[‘Person’].”</option>n”;
}
?>
</select>
</label>
</strong>
<label>Vendor
<input name=”Vendor” id=”Vendor” >
<?PHP
print “$namen”;
?>
</label>