Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <!doctype html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <body>
  5. <title>upload - birdupload</title>
  6. </body>
  7. </head>
  8.  
  9. <meta charset='UTF-8' />
  10. <meta http-equiv="Pragma" content="no-cache"/>
  11. <meta http-equiv="Expires" content="0"/>
  12.  
  13. <nav><a href="gallery.php">Gallery</a> | Home</nav>
  14.  
  15. <h3> <img src="/images/logo.png"> </h3>
  16.  
  17.  
  18.  
  19. <!-- stylesheet -->
  20.  
  21. <!-- /stylesheet -->
  22.  
  23. <link rel="shortcut icon" href="favicon.ico">
  24. <form action="upload.php" method="post" enctype="multipart/form-data">
  25. browse:
  26. <input type="file" name="image"><br/><br/>
  27. <input type="submit" name="upload" value="continue">
  28. </form>
  29.  
  30. <ul>
  31. <li>sent file name: <?php echo $_FILES['image']['name']; ?>
  32. <li>file size: <?php echo $_FILES['image']['size']; ?>
  33. <li>file type: <?php echo $_FILES['image']['type'] ?>
  34. </ul>
  35.  
  36. <?php
  37.  
  38.  
  39.  
  40. if(isset($_POST['upload'])){
  41. $image_name = md5($_FILES['image']['name']);
  42. $image_type = $_FILES['image']['type'];
  43. $image_size = $_FILES['image']['size'];
  44. $image_tmp_name= $_FILES['image']['tmp_name'];
  45. @$desc = $_POST['desc'];
  46. move_uploaded_file($image_tmp_name,"uploads/$image_name");
  47. echo "<img src='uploads/$image_name' width='350' height='250'><br>";
  48. echo "your image:";
  49.  
  50.  
  51. }
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement