Thank you for taking the time to read my post. Let me begin by saying that I am a novice so please take that into consideration when responding. I have a website that has been worked on by a professional developer and myself.
I presently have a form where my customers can submit contact information, Name, Address, etc. I would like to add the ability for these people to attach a file, EPS, PDF, JPEG, etc. with their submission.
The form presently uses PHP as the method of transferring the information. Can anyone help me with the code for adding a field using PHP that would allow my customers to submit a file with their information?
I don't use a database of any sort for these submissions, the information is sent to an email address.
Any help would be greatly appreciated.
Thank you,
Mike
Using PHP with a file transfer
Moderator: General Moderators
-
target2021
- Forum Newbie
- Posts: 1
- Joined: Mon Oct 19, 2009 8:50 am
Re: Using PHP with a file transfer
Do a Google search for "PHP HTTP File Uploads". There's a really helpful tutorial on the PHP documentation website that should pop up. That'll show you how to transfer the file from the client to your server.
I'd recommend using SwiftMailer for sending your email. It will drastically simplify the work of attaching a file to an email.
I'd recommend using SwiftMailer for sending your email. It will drastically simplify the work of attaching a file to an email.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Using PHP with a file transfer
You will want to upload the file using a html file input.
Here is a helpful tutorial on how to do this with PHP
http://www.w3schools.com/PHP/php_file_upload.asp
It Might also be helpful to read the manual about uploading a file here $_FILES
Here is a helpful tutorial on how to do this with PHP
http://www.w3schools.com/PHP/php_file_upload.asp
It Might also be helpful to read the manual about uploading a file here $_FILES