Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.137.174.253
<?php
include ("../database.php");
if($_SESSION['USER'] == 'admin')
{
$cnd = "";
}else
{
$cnd = "where m.fusername = '{$_SESSION['USER']}'";
}
$degreecode_query = "select distinct sa.fdegree,concat(de.fdegree,'-',de.fdescpn) as fdescpn
from pgstudadm sa
inner join degree de on sa.fdegree = de.fdegree
inner join masuser m on INSTR(m.fdegree,de.fdegree)
and de.fexamno = 'A'
{$cnd}";
$result = mysqli_query($conn,$degreecode_query);
$i=0;
while($deg = mysqli_fetch_array($result,MYSQLI_NUM))
{
$degree[$i] = $deg;
$i++;
}
$resp['degree'] = $degree;
echo json_encode($resp);
|