PDA

View Full Version : File Uploads, Form Results



ScottR
08-Feb-2006, 04:41 AM
Hello:
Need some help.

1. file uploads are not working after many tries. Here is my code from my html page:

<form enctype="multipart/form-data" method="post" action="/cgi-bin/formmail.php">
<input type="hidden" name="recipients" value="scott@bluewaveconcepts.com">
<input type="hidden" name="subject" VALUE="The Staffing Alternatives Application Page Job ID: <?=$appinfo?>">
<input type="hidden" name="good_url" VALUE="http://64.57.87.27/thankyou.html">

And here is the line of code for the attachment box:

<input type="file" name="uploaded_file" size="40">


2. when I get the info from the form, there are no line breaks or separations, it is all together as is a continuous sentence. I added a line of code per your doc but it had no effect. It was added to the under the input type=hidden statements above but was removed after it had no effect.

Please help, thanks.

I attached my files to look at.

asket
08-Feb-2006, 03:57 PM
regarding "2."

use

<input type="hidden" name="mail_options" value="KeepLines" />
for more structured emails you also can use a plain.txt or html template



regarding "1."

have you set in formmail.php at line 3386 FILEUPLOADS to true?

define("FILEUPLOADS",true);

ScottR
08-Feb-2006, 04:21 PM
regarding "2."

use

<input type="hidden" name="mail_options" value="KeepLines" />
for more structured emails you also can use a plain.txt or html template

>>I dont have this in my html form but will add it

regarding "1."

have you set in formmail.php at line 3386 FILEUPLOADS to true?

define("FILEUPLOADS",true);

>>Yes this is set in the formmail.php

asket
08-Feb-2006, 05:20 PM
i'm sorry, on the quick i've no idea
till yet i've not used the file upload feature and therefore i am not really trained in it

but i'll have look on it, maybe later, cause now i've no more time, i'm sorry

asket
14-Feb-2006, 09:40 AM
:( no idea. the enctype seems to be correct.
as already mentioned, till yet i didn't have used this feature, therefore i've no experience.. i'm sorry.
for featuring out a solution i would have to gain experience in that accompanied by spending time, which is rather a bad point of time at the time (time, time, :eek: )

MiaRx
22-Nov-2009, 03:44 AM
ScottR,
Did you find an answer to the #1 File upload question you had? I have the same problem and have inserted all the same codes.
If you found a solutions I would love to know it to get my form to work properly.

Thank you for your help!
Mia

marzi
29-Nov-2009, 01:42 AM
ScottR,
Below is the file upload code I have used with success and without problems. The form is completed and submitted. I get a nicely text formatted response with all the submitted information, the data goes into a .csv file and the submitted gets directed to a "Successful Form Submission" page.
Hope this helps.



<form method="post" action="http://www.mydomain.com/fbmail/formmail.php" name="SampleForm" enctype="multipart/form-data" onSubmit="rememberinput('fname','lname','company_name','useremail','phone','ext','hear')">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
<input type="hidden" name="derive_fields" value="ipaddr = REMOTE_ADDR browser = HTTP_USER_AGENT, referrer = HTTP_REFERER" />

<!-- STEP 6: to send the submitted form back to ??? DOMAIN as a formatted text email enter the name of the 'my-tmpl.txt'template file. -->
<input type="hidden" name="mail_options" value="PlainTemplate=my-tmpl.txt,TemplateMissing=n/a,KeepLines" />