Welcome!

And don't forget to edit your signature & profile.

 

Icon

Statistics

  • Total posts 27014
  • Total topics 4908
  • Total members 6646
  • Our newest member
    trickell

TOP POSTERS

Best Language to Build an File Upload Form?

All problems and developments related to PHP, Ruby on Rails & Co. are discussed and resolved here.
   
Hey all,

I need to build a file upload form. It will be a used to back up random files to a web server from anywhere. As for security, it will be very basic. Private URL, file size limit, and only certain file extensions.

I have one that I am tweaking in PERL, and have also seen PHP and Jquery options as well.

If you had to build a form like this, what would you code it in?

Thanks
PandaRunner: from east to west
www.pandarunner.com
User avatar
Madhattan
Smashing <frame>
 
Posts: 19
Joined: Mon Feb 09, 2009 2:47 pm
Location: Manhattan
   

   
I'd do it in php, set the file size upload limit in the .htaccess. It's not all that complicated. You can use jquery for validation
User avatar
TT_Mark
Smashing <li>
 
Posts: 443
Joined: Tue Feb 10, 2009 6:27 am
Location: Sheffield, UK
   

   
I'll agree with php but for the validation use both JavaScript/jQuery AND php (both cliend-side and server-side validation)
User avatar
burNMind
 
Posts: 6
Joined: Fri Sep 18, 2009 12:01 am
Location: UK
   

   

Re: Best Language to Build an File Upload Form?

Postby Andy » Fri Sep 18, 2009 8:29 am

burNMind wrote:I'll agree with php but for the validation use both JavaScript/jQuery AND php (both cliend-side and server-side validation)


I agree. Validation should always be done on the server-side to ensure security.
Validation on the client-side is just to create a responsive and effective website.

Client-side validation is not a substitute for server-side validation, merely a complement.
Andy
Smashing <h5>
 
Posts: 1305
Joined: Tue Sep 30, 2008 6:42 pm
Location: Sweden
   

   
Sorry, I did mean to say use both client and server side validation
User avatar
TT_Mark
Smashing <li>
 
Posts: 443
Joined: Tue Feb 10, 2009 6:27 am
Location: Sheffield, UK
   

   
So the PHP on the back end would validate file size and extension, but what should the front end validate?

I would like the form to just be a browse and submit deal. No logins, emails, etc, so I'm not exactly sure what the javascript would do.
PandaRunner: from east to west
www.pandarunner.com
User avatar
Madhattan
Smashing <frame>
 
Posts: 19
Joined: Mon Feb 09, 2009 2:47 pm
Location: Manhattan
   

   
Oh right, not really any need for JavaScript then. Php will do fine
User avatar
TT_Mark
Smashing <li>
 
Posts: 443
Joined: Tue Feb 10, 2009 6:27 am
Location: Sheffield, UK
   


Return to Server-side Scripting



Who is online

Users browsing this forum: No registered users and 2 guests