<?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'];
$idtp=$_GET['idtp'];

//nombre de grupo area
$sqlserv = "SELECT distinct(a.ga_id) as idga, (select ga_desc from tb_garea where ga_id=a.ga_id) as descripcion FROM tb_areaservicio a ";
$sqlserv = $sqlserv." where a.s_id='$ids' and a.j_id='$idj' and a.tp_id='$idtp'";
//echo $sqlserv;
$cadenagarea = "";
$cadenagarea = $cadenagarea."<select id='cbgarea' onChange='mostrararea()'>";
$cadenagarea = $cadenagarea."<option value='0'>Seleccione Grupo Area </option>";
$resultserv = mysqli_query($con,$sqlserv);
while ($rows= mysqli_fetch_array($resultserv)){
$cadenagarea = $cadenagarea."<option value='".$rows['idga']."'>".$rows['descripcion']."</option>";
}
$cadenagarea = $cadenagarea."</select>";

echo $cadenagarea;
?>