Advertisement
hamjoricantiq

ediit

Jan 14th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. $file           = $_POST['foto'];
  2.  
  3.         $foto           = $_FILES['foto'];
  4.  
  5.         if (!empty($foto) AND $foto['error'] == 0) {
  6.             $path = 'pwpb19/assets';
  7.             $upload = move_uploaded_file($foto, 'pwpb19/assets');
  8.  
  9.             if (!$upload) {
  10.                 flash('error', "Upload file gagal");
  11.                 header('location: index.php');
  12.             }
  13.             $file = $foto['name'];
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement