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

$idj=$_GET['idj'];

//nombre de grupo area
$sqlserv = "SELECT s_id as ids, s_desc as descripcion FROM tb_servicio where j_id='$idj'";
//echo $sqlserv;
$cadenaserv = "";
$cadenaserv = $cadenaserv."<select id='cbserv' onchange='mostrartipopersonal()'>";
$cadenaserv = $cadenaserv."<option value='-1'>Seleccione Servicio </option>";
$cadenaserv = $cadenaserv."<option value='0'>Dependencia Directa </option>";
$resultserv = mysqli_query($con,$sqlserv);
while ($row= mysqli_fetch_array($resultserv)){
$cadenaserv = $cadenaserv."<option value='".$row['ids']."'>".$row['descripcion']."</option>";
}
$cadenaserv = $cadenaserv."</select>";

echo $cadenaserv;
?>