PHP Upload Form

They have: 161 posts

Joined: Jan 2005

Hi,

I'm now in need of a *simple* PHP upload form that can upload a file no larger than 300k and just email me the uploaded file. Smiling

It's just an image upload form, really, except the image files are not hosted onto the server, but are emailed to an email address that I can configure. Smiling

I want to accept the following to email me these image types:
.gif, .jpg, .jpeg, and .png

Please reply back with a code on how to do this! Smiling
Thanks.

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

the upload part is easy, the not saving it and emailing it to you, is not.
creating email attachments with php is a little trickier, you can look at the mail funtion, here:
http://ca.php.net/function.mail
http://ca.php.net/features.file-upload
and this http://www.zend.com/zend/spotlight/sendmimeemailpart1.php

They have: 161 posts

Joined: Jan 2005

Too difficult.

They have: 161 posts

Joined: Jan 2005

Hello? *echo, echo, echo, echo*

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

I thought you said it was too difficult. I believe that's the standard way to attach files to an email programmatically. It's really never much simpler than that, in my personal experience.

They have: 161 posts

Joined: Jan 2005

No need for this anymore. Wink I used an easier way:

http://www.easysig.info/upload.php

Sticking out tongue

They have: 2 posts

Joined: Jun 2005

My php form handling script, FormM@iler, can send attachments. You can get it from http://scripts.dbmasters.net/ and view an example of sending an attachment, it's really not that hard, though different clients to view email will sometimes barf on it...I have gotten mine to work pretty much everywhere though, at least I haven't had a gbug report in some time.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.