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.224.73.150
<?php
require('includes/dbconnect.php'); //include database connection
//require('includes/functions.php'); //include functions
$appno = str_replace(chr(34),"",stripslashes(nl2br($_GET['appno'])));
$apiKey = str_replace(chr(34),"",stripslashes(nl2br($_GET['apiKey'])));
//$deviceDate = str_replace(chr(34),"",stripslashes(nl2br($_GET['deviceDate'])));
//$instCode = str_replace(chr(34),"",stripslashes(nl2br($_GET['instCode'])));
//$branchCode = str_replace(chr(34),"",stripslashes(nl2br($_GET['branchCode'])));
//$userName = str_replace(chr(34),"",stripslashes(nl2br($_GET['userName'])));
$studQuery = "SELECT FNAME,FROLLNO,FAPPNO,FAMOUNT FROM studadm
where FAPPNO='{$appno}'";
$studResult = $conn->query($studQuery);
if(mysqli_num_rows($studResult) != 1)
{
$statusCode = '0';
$statusMessage = "INVALID admission number.. Please try again";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
else
{
$row1 = mysqli_fetch_array($studResult,MYSQLI_ASSOC);
$returnArray = array(
"studentName" => $row1['FNAME'],
"regNum" => $row1['FROLLNO'],
"appNo" => $row1['FAPPNO'],
"amount" => $row1['FAMOUNT']
);
$jsonLoginArray = array("statusCode" => "1", "statusMessage" => "Success", "studentDetails" => $returnArray);
$returnString = json_encode($jsonLoginArray);
print $returnString;
}
?>
|