hamjoricantiq

ediit

Jan 14th, 2020
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         }
RAW Paste Data