<?php
$fileName = $_FILES['picture']['name'];
$fileSize = $_FILES['picture']['size'];
$fileError = $_FILES['picture']['error'];
if($fileSize > 0 || $fileError == 0){
$move = move_uploaded_file($_FILES['picture']['tmp_name'], 'upload/'.$fileName);
if($move){
echo "Gambarberhalil diupload";
}else{
echo "Gagal mengupload Gambar";
}
}else{
echo "Gagal mengupload Gambar: ".$fileError;
}
?>