SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Urgent: Simple HTML form with upload button?

    Hi all,

    I desperately need a simple form that will give the user an option to upload a file. I know this will probably involve some php and thats fine.

    Basically, all I need is a text box for their Name, one for an email address, text area for a comment, an upload button so they can select a file and send.

    It can either go to a folder on the server or to an email address, whichever is easier.

    Can anybody help??

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have the basic html form. When the file is submitted the user can be brought to a page thanking them for the comment and upload?

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>

    <body>


    <form action="" method="get" name="upload form">


    Name: <input name="name" type="text" value="name">
    <br>
    Commenttextarea name="comment" cols="" rows=""></textarea><br>

    Upload your file<input name="upload" type="file" size="10"></select><br>
    <br>

    <input name="Submit" value="Submit" type="button">

    </form>
    </body>
    </html>

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Read this PHP manual page which will walk you through all the issues, the first link shows an upload form which might be what you are looking for.

    Come back if with specific questions about things you do not understand.


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
  •