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>";
}
}
?>