Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <input type="file" name="uploadedfile" id="uploadedfile" />
  2. <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
  3. <input type="image" src="save.jpg" />
  4.  
  5. include 'db.php';
  6.  
  7. $file = basename($_FILES['uploadedfile']['name']);
  8.  
  9. $target = "uploads/".$file;
  10.  
  11. if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target))
  12. {
  13. echo "<strong>Success:</strong> File uploaded";
  14. }
  15. else
  16. {
  17. echo "<strong>Error:</strong> Could not upload file";
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement