<?php 
 include("../db.php");
 //header("Access-Control-Allow-Origin: * ");
 
 header('Content-Type: application/json');
 
 $schoolcode = $_POST['institute_id'];
 
 $getData = $db->getRow("select * from all_school_codes where code='".$schoolcode."' limit 1 ");
 if(count($getData)>1){
     $status = 1;
     $domain = $getData['school_url'];
     $session = $getData['login_session'];
 }
 else {
     $status = 0;
 }

 $array = array("status"=>$status, "url"=>"$domain", "login_session"=>"$session");
 
 echo json_encode($array);
 
?>