Hola, ando con un problema en el Combobox dinamico y ya no se como solucionarlo, mire foros por todos lados... Una vez q selecciono el primer comobo "Id_Area" me aparece el siguente problema:
Notice: Undefined index: Id_Puesto in C:\wamp\www\Sistema\Guardar_OrgEmpleados.php on line 20
El codigo es el siguente:
<body>
<?php
$conexion = mysql_connect("localhost", "root", "");
$bd = mysql_select_db("mgd");
$a = ("SELECT * FROM area ORDER BY Descripcion ASC");
$res = mysql_query($a, $conexion);
?>
<div id="apDiv3">
<form action="Guardar_OrgEmpleados.php" method="post" name="FormEmpleados" id="FormEmpleado">
<table width="264" border="1">
<tr>
<td width="104">Legajo</td>
<td width="144"><input name="Legajo" type="text" id="Legajo" /></td>
</tr>
<tr>
<td>Apellido </td>
<td><input name="Apellido" type="text" id="Apellido" /></td>
</tr>
<tr>
<td height="26">Nombre</td>
<td><input name="Nombre" type="text" id="Nombre" /></td>
</tr>
<tr>
<td>Area </td>
<td><select name="Id_Area" id="Id_Area" onchange="submit()">
<option value=" "></option>
<?php
while ($fila = mysql_fetch_array ($res)){
echo "<option value=".$fila["Id_Area"].">".$fila["Descripcion"]."</option>";
$area == $fila["Id_Area"];
}?>
</select></td>
</tr>
<tr>
<td>Puesto</td>
<td><select name="Id_Puesto" id="Id_Puesto">
<option value=" "></option>
<?php
If ($area!="0"){
$b = ("SELECT * FROM puesto WHERE Id_Area='$area'ORDER BY Descripcion ASC");
$res2 = mysql_query($b, $conexion);
while ($fila = mysql_fetch_array ($res2)){
echo "<option value=".$fila["Id_Puesto"].">".$fila["Descripcion"]."</option>";
}}
?>
</select></td>
</tr>
<tr>
<td>Foto </td>
<td> </td>
</tr>
</table>
<p>
<input type="submit" name="Guardar" id="Guardar" value="Guardar" />
</p>
</form></div>
?>
</body>
</html>
Muchas gracias!