<?php

include "connection.php";

$APP_ID = $_SESSION['id'];
// $APP_ID = 79;
$query = "SELECT APP_PHOTO FROM AD_APP WHERE APP_ID = '$APP_ID' ";

					
 
 
$parseresults = ociparse($conn, $query);

ociexecute($parseresults);


 $abc = array();
while (($row = oci_fetch_array($parseresults, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {

	foreach($row as $key=>$data) {

			if(is_object($data)){
				$abc[$key] = $data->load();
			//	base64_to_jpeg($data->load(),'abc.jpg');
			} else{
				$abc[$key] = $data;
			}
	}
	$abc = array_map('utf8_encode', $abc);
  //$output[]=$abc;
}
//$arout= json_decode(json_encode($output));

 
oci_free_statement($parseresults);
oci_close($conn);

$photoout=$abc['APP_PHOTO'];




?>