<?php include_once('database_connection.php');
error_reporting(0);
//print_r($_FILES);
//RequestID
//$filename=rand()*1200;
$RequestID=$_POST['requestID'];
$title=$_POST['title'];
$ppic=$_FILES['file']['name'];
	if($ppic!="")
		{
			$newfile=rand()*1200;
			$ext=strrchr($ppic,".");
			$newpic=$RequestID.$ext;
			save($_FILES['file'],'',"images/");	
			rename("images/".$ppic,"images/".$newpic);

$_SESSION[$title] =$arrayName = array($title =>$newpic);
		$res=array('status'=>"ok",'FileName'=>'file1234','RequestID'=>$newpic);
		echo json_encode($res);
		}
	//session_unregister(name)
	//session_unset();	
//print_r($_SESSION);

?>