Results 1 to 3 of 3

Thread: Uploading question

  1. #1
    Join Date
    Aug 2004

    Question Uploading question

    OK here comes the stupid question of the week. I love your script, very well documented. I do not write in php but I have it up and running. It works great except I can not figure out how to get it to upload. I have,

    File to Upload:

    <td><input type=""file" name=uploaded_file" />
    in my form and have set the php on line 1270 to read:

    PHP Code:

    ("FILEUPLOADS",true);                    // set to true to allow file attachments 
    I checked with my hosting company and they have informed me that my server allows uploads. They asked the question of where is the file being uploaded to? I am getting the emails that the php script is sending as follows:


    realname: matt berry

    mesg: blah blah test test

    uploaded_file: /home/matt/blah.txt

    What am I missing???

    I would also like to have the end user be able to browse their computer for the file they want to upload. How do I add that feature to my form?

    The sample form is setup at

    Thanks for your help. From a guy that knows knowing about php, I can tell you everything else went fine.

  2. #2
    Join Date
    Aug 2004

    Default Re: Uploading question

    OK here is my complete form:
    <title>Sample form for use with formmail.php</title>
    <p>This form demonstrates the use of formmail.php.
    <br>Note that formmail.php requires a one line change
    to work. Use a text editor to read the information
    at the top of formmail.php.
    <p>Also, you need to change this form using a text editor;
    follow the 4 simple steps shown in the comments.
    For full information and support, visit
    <a href="<A href=""></a">"></a>
    <!-- STEP 1: Put the full URL to formmail.php on your website in the 'action' value. -->
    <form method="post" action="" name="SampleForm" enctype="multipart/form-data" />
    <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
    <!-- STEP 2: Put your email address in the 'recipients' value. -->
    <input type="hidden" name="recipients" value="">
    <!-- STEP 3: Specify required fields in the 'required' value -->
    <input type="hidden" name="required" value="email:Your email address,realname:Your name">
    <!-- STEP 4: Put your subject line in the 'subject' value. -->
    <input type="hidden" name="subject" value="Sample FormMail Testing">
    <table border="0">
    <p>Please enter your name:
    <td><input type="text" name="realname">
    <p>Please enter your email address:
    <td><input type="text" name="email">
    <td valign="top">
    <p>Please enter your message:
    <td><textarea name="mesg" rows="10" cols="50"></textarea>
    <td valign="top">
    <p>File to Upload:
    <td><input type="file" name=uploaded_file" />
    <td><center><input type="submit" value="Submit">
    <!-- </table> -->
    Please support the ongoing development of FormMail and our other
    freeware products by keeping the following text on your form
    (or placing it elsewhere on your website). Thanks!
    <small>This form and its
    <a href="<A href="">free">">free FormMail</a>
    processor supplied by, creators of
    software <a href="<A href="">copy">">copy protection</a>.
    Now my emails read:

    realname: matt berry

    mesg: this is a test again





    HTTP_USER_AGENT=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8 REMOTE_USER=

    Above I have tried to attach a .jpg

  3. #3
    Join Date
    Dec 2003

    Smile Re: Uploading question


    You've got everything right, except for a missing quote.

    This line:
    <td><input type="file" name=uploaded_file" />
    should be this:
    <td><input type="file" name="uploaded_file" />
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Uploading Multiple Images
    By JNewb in forum FormMail Subscription Support
    Replies: 2
    Last Post: 12-Dec-2004, 02:39 PM
  2. question about PHP version 4.3.8
    By djgotee in forum FormMail Subscription Support
    Replies: 4
    Last Post: 28-Nov-2004, 11:46 PM
  3. TARGET_EMAIL question
    By middleburyman in forum FormMail Subscription Support
    Replies: 1
    Last Post: 03-Sep-2004, 08:30 PM
  4. Uploading files
    By russellr in forum HOWTO Guides and Tips
    Replies: 0
    Last Post: 31-Jul-2004, 08:42 PM
  5. at mangle / e-mail question
    By Ibis in forum FormMail Subscription Support
    Replies: 3
    Last Post: 25-Feb-2004, 02:59 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts