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.145.99.221
<?php
require('database.php'); //include database connection
$data_json = file_get_contents("php://input");
//var_dump($data_json);
$data = json_decode($data_json,true);
//var_dump($data);
if(!isset($data['univcode']))
{
$statusCode = 0;
$statusMessage = "University Code can not be empty. Please try again";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
if(!isset($data['regno']))
{
$statusCode = 0;
$statusMessage = "Register Number can not be empty. Please try again";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
$univcode = stripslashes($data['univcode']);
$regno = stripslashes($data['regno']);
$studQuery = "SELECT * from govt_scholorship_data where funivcode = '{$appno}'";
$studResult = $conn->query($studQuery);
if(mysqli_num_rows($studResult) != 1)
{
$statusCode = -1;
$statusMessage = "No Details found";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
else
{
$row1 = mysqli_fetch_array($studResult,MYSQLI_ASSOC);
$statusCode = 1;
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => "Success", "studData" => $row1);
$returnString = json_encode($jsonLoginArray);
print $returnString;
}
?>
|