0

How I can do:
1. Upload multiple files into folder.
2. Then fetch those files that had saved in a folder. (I have to upload once but fetch again and again )
3. and Then attach those files one by one and send to specified email/s.

3
Contributors
2
Replies
6
Views
5 Years
Discussion Span
Last Post by jcarbillon
0

How these file are uploaded to server? FTP, WebDav, forms?
How you have to send the files? As attachments or as download links? Second option, if you can, is preferable.

Basically anyway, if you want to submit by forms, you have to build a proper form to upload files, use the relative array $_FILES to check, rename and move them to a directory (throught move_uploaded_file()) and finally use mail() or PEAR mail() which is better for long running loops:

- http://php.net/manual/en/reserved.variables.files.php
- http://php.net/manual/en/function.move-uploaded-file.php
- http://php.net/manual/en/function.mail.php
- http://pear.php.net/package/Mail/

Both procedures: upload and mail attachments, have been discussed in the forum.
If the email list is fixed I suggest you to build an array and use that instead of a database connection, so you can speed up and limit hits on database.

0

things you need to know

1. I use this link to upload files http://www.tizag.com/phpT/fileupload.php, make sure the dump folder is outside www root folder to make it more secure and set its permission using chmod 775 command.

2. you may use phpmailer or pear to send and attached files from your dump folder.


hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.