Sorry, I were away from pc, and yeah, I see this problem my bad. I made mistake.
if(move_uploaded_file($_FILES["file"]["tmp_name"], $targetFilePath)){
$insert = "UPDATE users SET profile_img='$fileName' WHERE username='".$_SESSION['username']."'";
$insert = mysqli_query($connect, $insert);
if($insert){
$statusMsg = "The file ".$fileName. " has been uploaded successfully.";
}else{
$statusMsg = "File upload failed, please try again.";
}
}else{
$statusMsg = "Sorry, there was an error uploading you