How do i upload image file in a dir using php? Below is my form page code

Kindly somebody help i have tried uploading image with blob type data input on my database but after i search over the internet i found out that it is not a good idea and now i want to upload it to my directory how do i do here? Down below my code somebody kindly help me.

<?php


$host="localhost";
$username="root";
$pass="";
$db="registration";

$conn=mysqli_connect($host,$username,$pass,$db);
if(!$conn){
	die("Database connection error");
}

// insert query for register page
if(isset($_REQUEST['ronel']))
{

$details=$_POST['details'];
$location=$_POST['location'];
$date=$_POST['date'];
$time=$_POST['time'];
$checkbox=$_POST['checkbox'];
$name=$_POST['name'];    
$agegender=$_POST['agegender'];   
$contact=$_POST['contact'];
$empid=$_POST['empid'];
$dept=$_POST['dept'];    
$organization=$_POST['organization'];     
$summary=$_POST['summary']; 
$images=$_POST['images'];    
$outcome=$_POST['outcome'];    
$cause=$_POST['cause'];     
$action=$_POST['action'];
$reportedname=$_POST['reportedname'];
$position=$_POST['position'];    
$organisation=$_POST['organisation'];
$reportedcontact=$_POST['reportedcontact'];
$reporteddept=$_POST['reporteddept'];    
$status="Pending";
$comment=$_POST['comment'];
	
	
	 $query="INSERT INTO `proposals` (`details`,`location`,`date`,`time`,`checkbox`,`name`,`agegender`,`contact`,`empid`,`dept`  ,`organization`,`summary`,`images`,`outcome`,`cause`,`action`,`reportedname`,`position`,`organisation`,`reportedcontact`,`reporteddept`,`status`,`comment`) VALUES ('$details','$location','$date','$time','$checkbox','$name','$agegender','$contact','$empid','$dept' ,'$organization','$summary','$images','$outcome','$cause','$action','$reportedname','$position','$organisation','$reportedcontact','$reporteddept','$status','$comment')";
	
	$res=mysqli_query($conn,$query);
	if($res){
		$_SESSION['success']="Not Inserted successfully!";
		header('Location:');
	}else{
		echo "<script>alert('Proposal not applied!');</script>";
	}
	}
?>

Have a read up on move_uploaded_file() - that can move the file you upload into your storage folder, then you store the path in your database.

You should take care with security - at least use htmlspecialchars to prevent users from entering malicious code …

Despite this, move_uploaded_file is the solution, then save the filename in your database.
You can also find good jQuery uploader plugins to enhance UI & improve security (MIME type check, …)
This file uploader is far the best I know