SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    could some one please tell me the best way to enable a user to attach a file when they fill out a form?

    thanks,
    Steve
    Website design for small businesses.

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <form enctype="multipart/form-data" action="someserversidescript.php" method="post">
    <input type="file" name="somename">
    </form>

    Will allow a user to attach a file to a form, you will then need to specify a serverside script in the action attribute which will handle the file once it has been uploaded.

    If you are working in PHP I would suggest reading this:

    http://www.php.net/manual/features.file-upload.php
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.


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
  •