<?php
include("../bd/sql_variables.php");
$db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysql_select_db("$sql_db");

$idj = $_GET['idj'];
$ids = $_GET['ids'];
//seleccionando al combo tipo de personal
$sqltpersonal = "select a.tp_id as cod, (select tp_desc from tb_tipoperson where tp_id=a.tp_id) as descripcion from tb_areatipopersona a where a.j_id='$idj' and a.s_id='$ids'";
$resulttpersonal = mysql_query($sqltpersonal);
$cadenatp="<select id='tipopersonal' name='tipopersonal' onChange='listarpersonalterm1()'><option value='0' selected>TODOS</option>";
while ($rowtp= mysql_fetch_array($resulttpersonal)){
$cadenatp=$cadenatp."<option value='".$rowtp['cod']."'>".$rowtp['descripcion']."</option>";
}
$cadenatp=$cadenatp."</select>";
echo $cadenatp;
?>