Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. $fileName = $_FILES['picture']['name'];
  3. $fileSize = $_FILES['picture']['size'];
  4. $fileError = $_FILES['picture']['error'];
  5. if($fileSize > 0 || $fileError == 0){
  6. $move = move_uploaded_file($_FILES['picture']['tmp_name'], 'upload/'.$fileName);
  7. if($move){
  8. echo "Gambarberhalil diupload";
  9. }else{
  10. echo "Gagal mengupload Gambar";
  11. }
  12. }else{
  13. echo "Gagal mengupload Gambar: ".$fileError;
  14. }
  15. ?>