Web Development Help Please

Joined
26 Feb 2005
Messages
2,793
Reaction score
143
Location
Gwynedd
Country
United Kingdom
I am building a web site that needs to allow/help users to upload pics (of their garden) and for them to be stored in a database or directory somewhere. i then wish to display them somehow.

I am vaguely familiar with my sql, but am not sure how to handle the uploading.

anyone got experience?
 
Sponsored Links
If using PHP look at the $_FILES superglobal in the manual.

http://php.net/manual/en/reserved.variables.files.php
http://www.php.net/manual/en/features.file-upload.post-method.php

I would advise against storing images as a BLOB in a database directly and instead rely upon maintaining reference via the file name in a suitable directory structure.

I would also look at the GD or ImageMagick libraries for image manipulation to resize uploaded images and store thumbnails upon upload for a gallery view.

Also be aware that you will need to modify the max upload size limit in PHP in order to accept files above your hosts set limit, by default this is 8MB but it's not uncommon for smaller hosts to limit this further, saying that, your users really shouldn't be uploading files that are over 2MB ideally.

If not implementing a custom solution there are several free packages available that already do this and it isn't hard to find them.
 
Sponsored Links
Back
Top