PHP file upload

File Upload tutorial by Birdie@ByteForums.com

Larger version of the tutorial and others on site.

22 Comment(s)

  1. glad you like it.

    I’ll be making some others when I have time (mainly from requests I’ve been sent)

    CBirdieUK | Oct 8, 2008 | Reply

  2. thank you for uploading this video. it is the easiest php file upload script i’ve seen yet, and it works just fine.

    nolisting | Oct 8, 2008 | Reply

  3. Ahhh that good old bug, haha yeah I remember that, understandable now. :)

    cppwhore | Oct 8, 2008 | Reply

  4. yeah, used to use that but had problems with it on older versions of PHP because it never used to have POST as unset or something.

    CBirdieUK | Oct 8, 2008 | Reply

  5. Just a little tip mate, if you’re re-loading php on the same page, call isset($_POST['submit']) it’s a lot better :P

    cppwhore | Oct 8, 2008 | Reply

  6. so how do you display the uploaded file thank you any help would be great

    tuckbloor | Oct 8, 2008 | Reply

  7. over 5 years of php freelance work, i’ve never saw a problem with that technique as almost every browser on the web submits the submit button. Anyway, what i was checking on their was a hidden input value so if that doesnt submit, its not exactly a good browser. Its just easier to teach when this stuff can already be confusing for someone watching a 5 min video.

    CBirdieUK | Oct 8, 2008 | Reply

  8. it’s not about security, it’s more about learning noobs the wrong thing. It could be possible that a browser doesn’t send the submit button along with the form, than you’re screwed with your script. It wil be ok with the request_method!

    anneliessmet | Oct 8, 2008 | Reply

  9. Why not?

    No extra security added on and its just more for a newbie to learn in a quick tutorial

    CBirdieUK | Oct 8, 2008 | Reply

  10. Never heard of $_SERVER['REQUEST_METHOD']?
    Never just check for a variable!

    anneliessmet | Oct 8, 2008 | Reply

  11. DreamWaver.

    Petterss22 | Oct 8, 2008 | Reply

  12. what php editor is that

    sssanny | Oct 8, 2008 | Reply

  13. just add an if(!move_uploaded_file(…)) { error message }

    CBirdieUK | Oct 8, 2008 | Reply

  14. I added a MAX_FILE_SIZE to the form, so I tested it and it stops files larger than 100KB but it still says its uploaded even though it hasnt, so I think I need to add an ‘else’ in there somewhere.

    buzincarl | Oct 8, 2008 | Reply

  15. How do we add ‘else’ so that if there was an error we would know of it ?

    buzincarl | Oct 8, 2008 | Reply

  16. okay thanks!

    bart0z | Oct 8, 2008 | Reply

  17. Nice Video :)

    DunkelHeit18jt | Oct 8, 2008 | Reply

  18. using notepad, when on save as…

    choose “all files” for “save as type”

    CBirdieUK | Oct 8, 2008 | Reply

  19. i copied the code.. but, as what do i save it? i used notepad, but then when i save it as a .php file, it saves it as for example upload.php.txt.. and thats nog right

    bart0z | Oct 8, 2008 | Reply

  20. thank you dude !!!

    juliomario14 | Oct 8, 2008 | Reply

  21. thank you so much! just what i’ve been lookin for! very helpful! keep it up! ^_^

    airvinz | Oct 8, 2008 | Reply

  22. xD Har har har!

    Sounds so funny, trying to avoid the accent? =P

    kalok88 | Oct 8, 2008 | Reply

Sorry, comments for this entry are closed at this time.