If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to Allow Users to Upload Images to My Website?

I take care of a few of my churches websites. On 1 of them I would like to make a page that allows members to upload images. I will then take the images and place them on the site in galleries for people to see.

How can I accomplish this? I want it to be a page you have to input your name and email address so that I can verify who the images are from.

You're suggesting doing a lot of this manually, so why not just ask them to email you the photos? That would obviously be easier to set up.

If not, you'll need to create a file upload form. You probably can't use a free form mailer because those don't usually allow any files (but you could look for one). This means you'll need to set up a form and then use PHP (or a similar language) to process it.

If you want to do this with PHP, you can start here:http://php.net/manual/en/features.file-upload.php
That's fairly technical, but it's worth being aware of the information and there are a few examples.
Then just search Google for the many tutorials out there about uploading files.

Security is a major concern, at least if they can ever access the files directly. (If you're doing this manually, I'd suggest just hiding the images somewhere [usually outside of the http root folder is a good idea], then moving them once you've checked them.) If you do this automatically, which would be possible, so they'd immediately be visible on the website, you'd need to check that it's not a dangerous file type and potentially check the kind of image. There's also an issue of format and filesize. You'll probably want some way to reject especially large files (and dangerous file types, like .php).

As for the name and email, you can also do that with a form that will then (via PHP) send you an email confirming it. (Or you could have it save it in a database, or create a text file, etc.)

Easy answer: ask them to email the images.
More complex answer: learn how to use PHP (or a language like it) for doing this sort of thing-- it's a big project and will be challenging probably, but it's possible.