PDA

View Full Version : File Uploading Automatic...



Scientist
12-20-2005, 08:11 AM
Can somebody please help me?

I don't understand... How can I make it so that when I add the upload file tool in my form, how can I make it so that it sends the file to my email address as an attachment.. or even BETTER...

When somebody uploads a file, it checks if it is an either .exe file or a .zip file, if it is one of those files is uploads itself to a certain database of uploads on my website space by some sort of PhP and displays a link to download on a specified page along with the toher uploaded files.

Basically, I want to make it so that anybody can upload a file and automatically have it listed on my website.

To keep it simple, I'd also go with sending the uploaded file as an attachment to my email.

VodaHost
12-21-2005, 07:43 AM
This requires sometype of scripting function. What exactly are you trying to accomplish?

navaldesign
12-21-2005, 03:01 PM
Can somebody please help me?

I don't understand... How can I make it so that when I add the upload file tool in my form, how can I make it so that it sends the file to my email address as an attachment.. or even BETTER...

When somebody uploads a file, it checks if it is an either .exe file or a .zip file, if it is one of those files is uploads itself to a certain database of uploads on my website space by some sort of PhP and displays a link to download on a specified page along with the toher uploaded files.

Basically, I want to make it so that anybody can upload a file and automatically have it listed on my website.

To keep it simple, I'd also go with sending the uploaded file as an attachment to my email.

As said above, you need some scripting to do that.
First, if you want to check the kind of file, you need to have the uploaded file variable checked, then you need to specify in which directory of your site it will be uploaded, then you need to get the file url attached to the email that you receive. This is enough explained in http://www.vodahost.com/vodatalk/showthread.php?p=11943#post11943
That's the script i use for my own form. Note that le last part, regarding the autoresponder, will not work if the mail() function is disabled. I trick-solved this problem setting the webmail autoresponder to autorespond for me instead of the script itself.

Please note that the email address to use should be on your Vodahost account. Also you may use as many upload fields as you want, but the check has to be done for each one separately. In my case I have also used separate error pages so the visitor will know what - if anything - goes wrong.