Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $foto = $_FILES['foto'];
- if (!empty($foto) AND $foto['error'] == 0) {
- $path = './media/images/';
- $upload = move_uploaded_file($foto['tmp_name'], $path . $foto['name']);
- if (!$upload) {
- flash('error',"Upload file gagal");
- header('location:index.php');
- }
- $file = $foto['name'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement