File Upload Example
<?php if(isset($_POST['submitUpload'])){ if(isset($_FILES['fileInput'])){ $tmp=$_FILES['fileInput']; $fileName=$tmp['name']; $tmpPath=$tmp['tmp_name']; $fileSize=$tmp['size']; $arr=explode(".",$fileName); $ext=end($arr); $allowedExt=array("jpg","png","jpeg","bmp"); if(in_array($ext,$allowedExt)){ if($fileSize <= (1024*1024*2)){ move_uploaded_file($tmpPath,"uploaded_files/".$fileName); echo "file Uploaded Successfully"; } else{ echo "file must not be grater then 2MB"; } } else{ echo "File type '{$tmp['type']}' not allowed"; } } else{ echo "File is not uploaded"; } } ?> <html> <head><title>File Upload</title></head> <body> <form action="<?php echo $_SERVER['PHP_SELF'...