Results 1 to 5 of 5

Thread: Adding an attachment within FORMS

  1. #1
    Join Date
    Oct 2005
    Location
    Liverpool, UK
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Adding an attachment within FORMS

    Hi,

    Is it possible to allow the user to attach a file (maybe via copy & paste) into some sort of INPUT type on a FORM? I need the email recipient to receive both the text and the attached file.

    Thanks in advance,

    Neil.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    <input type="file"> is what you're looking for. Be aware that you'll need to use an appropriate backend, though.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Oct 2005
    Location
    Liverpool, UK
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks Twey.

    So, by doing this, the field will accept a 'pasted' file?
    Or, is 'file' expected to be a pre-defined "name.ext" ..?

    Can you ellaborate please - re the backend piece?

    Thanks again,

    N.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Or, is 'file' expected to be a pre-defined "name.ext" ..?
    Yes, it needs to be typed in, but a "browse" button is also provided to do this automatically.
    Can you ellaborate please - re the backend piece?
    http://uk.php.net/features.file-upload
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Oct 2005
    Location
    Liverpool, UK
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks Twey - will give it a whirl.

    Cheers,

    N.

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
  •