Advanced Search

Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Upload using PHP

  1. #1
    Join Date
    Dec 2012
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Upload using PHP

    In the middle of creating my first ever website after teaching myself HTML over the past 5 or 6 weeks.

    I would like to create an upload area where clients can upload certain file types up to 100MB in size to a folder on our server. Of course once I get it working, it will be then password protected.

    It is a simple form with an upload button. Here is the form http://www.dev.kenwhitesigns.co.uk/client-area.html

    Can someone direct me how to amend this form and create a .php file to allow this?

    I had it working a couple weeks ago, so I know it will work. I just can not for the life of me remember how I did it and foolishly I did not save the script anywhere for future use.

    Any help would be much appreciated.

    Thanks

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,627
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    1. Info about PHP uploads.
    If you need help with specific code issues, please post your code.

    2. Don't make security an afterthought. Adding security after-the-fact will lead to security holes.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,885
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    Just wondering. Is it an upload area for each particular client where they can login and manage their own resources? Or is it a generic client upload area where they can just upload but not delete/edit - more of a one-stop-dropoff point?

    If you could let us know a bit more about the features you'd need and what you'd like to do with the uploads once they're on the server, maybe we could recommend a pre-made script package with security already taken care of.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,885
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    After looking at your web page, maybe you can kill two birds with one stone and use a contact form with anti-spam captcha that only allows specific file upload or a certain size?

    Alternatively, depending on how big you imagine this service will get (allowing for expansion) and who you need to manage the uploads/messages/job specifics in the backend (non-techy types who you don't want poking around in FTP), you might even like to think about something like the free version of Form Tools http://www.formtools.org/ . Use it to easily process and manage any form of your making, add captcha, validation, allow uploads (limit file type and size), send receipt emails to you and the 'submittee' and even create simplified 'client' accounts so your non-techy work mates can view form/upload submissions through the backend admin panel. You can even create hidden form fields which is a handy way to make notes in the backend to log which submissions have been actioned.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  5. #5
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    It's actually fairly simple to do this yourself as opposed to using something like formtools:
    http://www.tizag.com/phpT/fileupload.php
    Last edited by bernie1227; 12-10-2012 at 11:29 PM.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,627
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    true, but formtools is a very nice utility. Has lots of stuff set up to keep things organized.

    In any case, I think we need to hear more from the OP before deciding on a course of action.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,885
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    Quote Originally Posted by traq View Post
    true, but formtools is a very nice utility. Has lots of stuff set up to keep things organized.

    In any case, I think we need to hear more from the OP before deciding on a course of action.
    I'm a fan of Form Tools - can't you tell I just threw that in as an option while we dont know all the details.

    I agree that it might be overkill for smaller projects (that's why I thought that a contact form with attachment field might be suitable for now) but it's good to consider other options with a view to 'future-proofing' and expansion, and that's where I believe Form Tools can potentially solve a lot of organisational problems.

    There are so many possibilities for where and how it can be used (for external/frontend form submissions or internal/backend data input), not to mention it being so convenient for managing all website forms via one interface, so it's a good tool to have in your arsenal.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  8. #8
    Join Date
    Dec 2012
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your responses.

    It will simply be used as a drop off point. It will not allow access to customers to edit, delete, view or remove files. I would like to leave it in a dedicated area rather than incorporate it in to the contact area, simply because sometimes it is nice for customers/clients to feel that there is a special area within our website just for them (as this will be used mainly by regular and existing customers).

    Our company is only a small business with few staff so I can control the back end ftp access and editing fairly easily so I am not particularly concerned with this area.

    I will have a look at form tools. But will probably prefer using a simple php script.

  9. #9
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    IMO, OP's just starting out, so it's better for them to learn to do these things themselves rather than relying on things like formtools, however good it may be.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  10. #10
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,885
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    It certainly is better to learn how to do things - trial and error is going to give anyone a better understanding of how and why we do certain things, and smaller projects often present prime opportinities to test ourselves.

    Form Tools is just an option that would be better used for larger-scale data-submission/collation/organisation.

    spiper would of course need to evaluate the merits of both points based on his/her own requirements
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. how can i do file upload control to upload any image
    By Rai_87 in forum MySQL and other databases
    Replies: 0
    Last Post: 07-04-2008, 01:36 AM
  2. Replies: 2
    Last Post: 03-15-2007, 09:11 AM
  3. Upload
    By egrave in forum JavaScript
    Replies: 3
    Last Post: 10-21-2006, 02:39 PM
  4. how can i upload
    By king2tc in forum PHP
    Replies: 0
    Last Post: 08-15-2006, 04:21 PM
  5. help need in upload
    By pkcidstudio in forum MySQL and other databases
    Replies: 1
    Last Post: 06-14-2006, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •