<?php
if(isset($_POST['org'])){
	require_once('../../assets/config/config.php');
	$obj=new Database();
	$org=$_POST['org'];
	$email=$_POST['email'];
	$website=$_POST['website'];
	$address=$_POST['address'];
	$mobile=$_POST['mobile'];
	$file_name=$_FILES['file']['name'];
	if (isset($_FILES['file']['name']))
	{
	// If the ‘pdf_file’ field has an attachment
		$file_name = $_FILES['file']['name'];
		$file_tmp = $_FILES['file']['tmp_name'];
		
		// Move the uploaded pdf file into the pdf folder
		move_uploaded_file($file_tmp,"../images/".$file_name);                 
	$status=$obj->update('organization',['organization'=>$org,'email'=>$email,'website'=>$website,'mob_no'=>$mobile,'address'=>$address,'logo'=>$file_name],'id=1');
	if($status==1)
	{
		echo "<script>
		window.location.href ='../organization.php';</script>";
	}
	}
}
?>