![]() |
How to add image attachment within a form
I have created a form with my hosts form mail utility but want to include fields that allow image attachments. How can I do this?
|
Code:
|
HTML:
Code:
Code:
if (!(file_exists($_FILES['uploadedfile']['tmp_name']))) { |
Howling Wulf,
I have tried your input field and submitted a form but the resulting output gives me a local file that I can't open. ie: E:\\My Pictures\\2006-03-23, Rumbelinas II\\Rumbelinas II 001.jpg since this file is on my computer only how could I open an image if somebody submitted one to me and it was located on their local harddrive, not a server? cd34, I do not understeand where I would put your code(s) in my form |
The input field is put between the
|
But where do I put cd34's code?
|
Generally, I would do something like
Code:
if (!(file_exists($_FILES['uploadedfile']['tmp_name']))) { |
So do I place the php code in a seperate file? Do I point my form action to this php file? Right now here is my form:
and here is my output: Below is the result of your feedback form. It was submitted by Unknown Stranger (nobody@servage.net) on January 29th, 2007 submit: Submit email: nobody@servage.net realname: Unknown Stranger if I remove the enctype="multipart/form-data" I at least get a return of an image pointing to a local file: Below is the result of your feedback form. It was submitted by Unknown Stranger (nobody@servage.net) on January 29th, 2007 picture1: C:\\Documents and Settings\\Al\\My Documents\\Invoices\\inv22.jpg picture2: C:\\Documents and Settings\\Al\\My Documents\\Invoices\\inv23.jpg submit: Submit email: nobody@servage.net realname: Unknown Stranger I want people to upload files with their forms. Is this a server issue as the form is being pointed to a page controlled by them through the form action attribute? |
|
All times are GMT -4. The time now is 06:46 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc