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.144.242.149
<?php
include("/var/www/config.php");
$servername = SERVERNAME;
$username = USERNAME;
$password = PASSWORD;
$conn = new mysqli($servername,$username,$password);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$db = $_POST['univcode'];
$degree = $_POST['degree'];
// $type = $_POST['type'];
$query = "SELECT DISTINCT m.fboardcode, m.fboardname FROM {$db}.masboard m
INNER JOIN {$db}.masqp q ON q.fboard = m.fboardcode WHERE fdeggrp = '$degree'";
$result = mysqli_query($conn,$query);
// var_dump($conn);
// die();
if($result -> num_rows > 0){
$i=0;
while ($row=mysqli_fetch_assoc($result)){
$arr[$i]['fboardcode']=$row['fboardcode'];
$arr[$i]['fboardname']=$row['fboardname'];
$i++;
}
}
echo json_encode($arr);
?>
|