$sql = "INSERT INTO data
(id, docname, class, subject, docset, event,
docobject, usermail)
VALUES ('$dname','$cls','$sub','$dset','$event',
'$target','$ssn')";
$result = mysqli_query($con,$sql);
if ($result==true) {
if (move_uploaded_file($file, $target)) {
echo "Data uploaded successfully.";
} else {
echo "Data upload not done properly!";
}
} else {
echo "Query error!";
}