Results 1 to 3 of 3

Thread: Uploading question

  1. #1
    Join Date
    Aug 2004
    Posts
    5

    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:

    define
    ("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:


    email: bob@bob.com

    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 http://tntpics.com/sampleform.html


    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
    Posts
    5

    Default Re: Uploading question

    OK here is my complete form:
    <html>
    <head>
    <title>Sample form for use with formmail.php</title>
    </head>
    <body>
    <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.
    <p>
    For full information and support, visit
    <a href="<A href="http://www.tectite.com/">www.tectite.com</a">http://www.tectite.com/">www.tectite.com</a>
    <p>
    <!-- STEP 1: Put the full URL to formmail.php on your website in the 'action' value. -->
    <form method="post" action="http://www.tntpics.com/formmail.php" 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="form@tntpics.com">
    <!-- 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">
    <tr>
    <td>
    <p>Please enter your name:
    <td><input type="text" name="realname">
    <tr>
    <td>
    <p>Please enter your email address:
    <td><input type="text" name="email">
    <tr>
    <td valign="top">
    <p>Please enter your message:
    <td><textarea name="mesg" rows="10" cols="50"></textarea>
    <tr>
    <td valign="top">
    <p>File to Upload:
    <td><input type="file" name=uploaded_file" />
    <tr>
    </table>
    <td><center><input type="submit" value="Submit">
    <td>
    <!-- </table> -->
    </form>
    <!--
    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="http://www.tectite.com/">free">http://www.tectite.com/">free FormMail</a>
    processor supplied by www.tectite.com, creators of
    software <a href="<A href="http://www.tectite.com/">copy">http://www.tectite.com/">copy protection</a>.
    </small>
    </body>
    </html>
    Now my emails read:
    email: test@test.com

    realname: matt berry

    mesg: this is a test again

    uploaded_file:

    ==================================

    REMOTE_HOST=

    REMOTE_ADDR=66.115.130.250

    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
    Posts
    3,980

    Smile Re: Uploading question

    Hi,

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

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

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

Bookmarks

Posting Permissions

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