how to put code for check file size before upload in the if issertfile .the file is in format pdf or docs
$targetDirg= "folder/pda-semakan/gambar/";
if(isset($_FILES['gambar'])){
$fileNameg = $_FILES['gambar']['name'];
$targetFilePathg = $targetDirg . $fileNameg;
//$main_tmp1 = $_FILES['surat']['tmp_name'];
$moveg =move_uploaded_file($_FILES["gambar"]["tmp_name"], $targetFilePathg);
}