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


$idj=$_GET['idj'];
$ids=$_GET['ids'];

//nombre de grupo area
$sqlserv = "select a.tp_id as cod, (select tp_desc from tb_tipoperson where tp_id=a.tp_id) as descripcion from tb_areatipopersona a ";
$sqlserv = $sqlserv." where a.j_id='$idj' and a.s_id='$ids'";
//echo $sqlserv;
$cadenatp = "";
$cadenatp = $cadenatp."<select id='cbtp' onChange='mostrargarea()'>";
$cadenatp = $cadenatp."<option value='0'>Seleccione Opcion </option>";
$resultserv = mysqli_query($con,$sqlserv);
while ($row= mysqli_fetch_array($resultserv)){
$cadenatp = $cadenatp."<option value='".$row['cod']."'>".$row['descripcion']."</option>";
}
$cadenatp = $cadenatp."</select>";

echo $cadenatp;
?>