Page 1 of 1

Newbie formmail help

Posted: Tue Aug 24, 2004 11:51 am
by marinajc
I'm using Jack's script for form mail. I'd like to be able to allow the uploading of files. What modifications do I need to make to my form and/or script to do this?

I am new to PHP, so please explain it in simple terms and thanks for your help! :roll:

Posted: Tue Aug 24, 2004 12:01 pm
by feyd

Error

Posted: Tue Aug 24, 2004 3:29 pm
by marinajc
Thanks. I tried that, but I get "page not found" and this "_URL_" appears at the end of my domain.

Posted: Tue Aug 24, 2004 3:32 pm
by feyd
that page is an example only.. you are supposed to replace _URL_ with your processing script's location.
The "_URL_" in the above example should be replaced, and point to a PHP file. The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field, and its value is the maximum filesize accepted. Also, be sure your file upload form has enctype="multipart/form-data" otherwise the file upload will not work.
Which appears just below their example.

email

Posted: Tue Aug 24, 2004 7:12 pm
by marinajc
Thanks, I didnt get an error, but it never came in my email either. I'm thinking there is something missing in the form. There is no email address in it, so how can it be sent to my email? What should the form say?

Thanks. This is what I have now:

<form enctype="multipart/form-data" action="index.htm" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>

Posted: Tue Aug 24, 2004 7:17 pm
by feyd
I'm not sure how Jack's form mail script works, but generally, there should be a page with the standard form for sending an the email in it, you can insert the MAX_FILE_SIZE and userfile fields into that form, then alter the processing script to take those values into consideration..

there are many threads on this site with file upload processors, and there are a few different threads with how to attach data.. using Phuse may help you search more effectively..