Hola, creo que el problemilla esta aqui...
Código PHP:
$sql="select * from itil_vp where estado='A' order by cod_vp";
echo "<select name='vp' class='btn' onChange='xajax_ger(document.form1.vp.options[document.form1.vp.selectedIndex].value)'>";
echo "<option value='0'> </option>";
foreach ($dbh->query($sql) AS $row)
{
echo "<option value='".$row['COD_VP']."'>".$row['DETALLE']."</option>";
}
echo "</select></td></tr>"
Deberia ser asi:
Código PHP:
$sql="select * from itil_vp where estado='A' order by cod_vp";
$rs=$dbh->query($sql);
echo "<select name='vp' class='btn' onChange='xajax_ger(document.form1.vp.options[document.form1.vp.selectedIndex].value)'>";
echo "<option value='0'> </option>";
while ($row=$rs->fetch_assoc())
{
echo "<option value='".$row['COD_VP']."'>".$row['DETALLE']."</option>";
}
echo "</select></td></tr>"
Espero te funcione, saludos....