<?php
//upload.php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if($_FILES["file"]["name"] != '')
{


extract($_POST);

 $test = explode('.', $_FILES["file"]["name"]);
 $ext = end($test);
 $name = $jvnos . '.' . $ext;
 $location = 'upload/' . $name;  
 move_uploaded_file($_FILES["file"]["tmp_name"], $location);
 echo '<img src="'.$location.'" height="150" width="225" class="img-thumbnail" />';

require 'connection.php'; 
	$picaddrs= $location;
	
  $purqry = "UPDATE `jvvoucher` SET slipimage='$picaddrs' where vno=$jvnos";
		$purrun = mysqli_query($connect, $purqry) or die(mysqli_error($connect));


}
else{
	echo 'No Image Found !';
}



?>
