<?php
//include("../connectdb.inc.php");
@session_start();
define("ABSPATH",$_SERVER["DOCUMENT_ROOT"]."/e-shopper/");
$uploaddir = ABSPATH.'uploads/product/'; 
$imgArray = array();
if(basename($_FILES['saleImg1']['name'])){
	 $file1 = $uploaddir . basename($_FILES['saleImg1']['name']); 
	 if(move_uploaded_file($_FILES['saleImg1']['tmp_name'], $file1)){
	  	
		$_SESSION['saleImg1'] = basename($_FILES['saleImg1']['name']);
		
	 }
}else if(basename($_FILES['saleImg2']['name'])){
	$file2 = $uploaddir . basename($_FILES['saleImg2']['name']); 
	 if(move_uploaded_file($_FILES['saleImg2']['tmp_name'], $file2)){
		$_SESSION['saleImg2'] = basename($_FILES['saleImg2']['name']);
	}
}else if(basename($_FILES['saleImg3']['name'])){
	$file3 = $uploaddir . basename($_FILES['saleImg3']['name']); 
	 if(move_uploaded_file($_FILES['saleImg3']['tmp_name'], $file3)){
	  	$_SESSION['saleImg3'] = basename($_FILES['saleImg3']['name']);
	 }
}else if(basename($_FILES['saleImg4']['name'])){
	$file4 = $uploaddir . basename($_FILES['saleImg4']['name']); 
	 if(move_uploaded_file($_FILES['saleImg4']['tmp_name'], $file4)){
	  	$_SESSION['saleImg4'] = basename($_FILES['saleImg4']['name']);
	 }
}else if(basename($_FILES['saleImg5']['name'])){
	$file5 = $uploaddir . basename($_FILES['saleImg5']['name']); 
	 if(move_uploaded_file($_FILES['saleImg5']['tmp_name'], $file5)){
	  	$_SESSION['saleImg5'] = basename($_FILES['saleImg5']['name']);
	 }
}

?>