Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help script to save input file in a specified file folder

    here is my html code:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <form id="form1" name="form1" method="post" action="">
      <div>
        <label for="name3">Name: </label>
        <input type="text" name="name" id="name3" />
      </div>
        <div>
          <label for="phone">Phone Number</label>
          <input type="text" name="phone" id="phone" />
      </div>
          <div>
            <label for="ticket">Ticket Number</label>
            <input type="text" name="ticket" id="ticket" />
      </div>
            <div>
              <label for="issue">Issue:</label>
              <select name="issue" id="issue">
                <option value="no sync">no sync</option>
                <option value="no route">no route</option>
                <option value="resched">resched</option>
                <option value="cancel">cancel</option>
              </select>
      </div>
      <div>
    <label for="category">Category:</label>
                <select name="category" id="category">
                  <option value="level 1">level 1</option>
                  <option value="level 2">level 2</option>
                  <option value="level 3">level 3</option>
                </select>
                </div>
        <div><input type="file" name="upload" id="upload" />
      </div>
      <div>
        <label for="summary">Summary:</label>
        <textarea name="summary" id="summary" cols="45" rows="5"></textarea>
      </div>
      <div>
        <input type="submit" name="submit" id="submit" value="Submit" />
        <input type="submit" name="preview" id="preview" value="Review" />
        <input type="submit" name="clear" id="clear" value="Clear" />
      </div>
    </form>
    </body>
    </html>
    if someone can help with this. what i would like to do is when i click on SUBMIT button, all the information input in the form will be save in a folder as an html file depending on which category it is. for example it will be save in "C:\Users\owner\Documents\New Folder" so all the level1 category will be save in one html file, level 2 in one html file and level3 in one html file. if there is an uploaded jpeg file it will be displayed inside the html file as well.

    pls HELP! (im not sure if the script i need is php or js)

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    It would be PHP, but I think you're going to need some sort of database
    to keep track of levels? Normally, you would be saving the data in a
    database, and PHP would display whatever "page" you want, based on level.
    There would not be any "new folders" or .html files ... it would by dynamically
    generated by PHP. This website you're viewing now is an example of that.
    There are no HTML web pages ... each page you see is made by a PHP script.
    The information you see is taken from a database, and displayed depending on
    the codes you see in the URL (web page address).


  •  

    Posting Permissions

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