Log in

View Full Version : Adding an attachment within FORMS



NGJ
02-08-2006, 08:55 PM
Hi,

Is it possible to allow the user to attach a file (maybe via copy & paste) into some sort of INPUT type on a FORM? I need the email recipient to receive both the text and the attached file.

Thanks in advance,

Neil.

Twey
02-08-2006, 09:11 PM
<input type="file"> is what you're looking for. Be aware that you'll need to use an appropriate backend, though.

NGJ
02-08-2006, 09:16 PM
Thanks Twey.

So, by doing this, the field will accept a 'pasted' file?
Or, is 'file' expected to be a pre-defined "name.ext" ..?

Can you ellaborate please - re the backend piece?

Thanks again,

N.

Twey
02-08-2006, 09:25 PM
Or, is 'file' expected to be a pre-defined "name.ext" ..?Yes, it needs to be typed in, but a "browse" button is also provided to do this automatically.

Can you ellaborate please - re the backend piece?http://uk.php.net/features.file-upload

NGJ
02-08-2006, 09:37 PM
Thanks Twey - will give it a whirl.

Cheers,

N.