Results 1 to 5 of 5

Thread: Saving Form Web Form Data

  1. #1
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Saving Form Web Form Data

    Does anybody know how to have a web form remember the text entered in for textboxes and textarea fields, so that when the user brings it up again the form is filled in with the data from before?

    Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    cookies? (they are cleared by the user every once in a while)

    php storing by IP or login would work too. A bit complex, though... you'd need a database or at least a text file for this. DB would be easier, if possible.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I suppose that I will try cookies then.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    cookies? (they are cleared by the user every once in a while)
    They might also be rejected outright, and there is a limit to how much data they can hold. Moreover, on a shared machine, the data may not correspond to the original visitor that caused their creation.

    If this feature the OP is working on is a must (for example, implementing partial completion of a form), then there's no realistic option in my opinion beyond creating a log-in system where that data is stored on the server.

    Mike

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Sessions (using php) would work. That would ONLY last for the current session which is vaguely defined as "as long as they stay on your pages (where the session is continued in the php code) and don't close the browser window" or something like that.
    Wouldn't work long term.
    Cookies are what sessions use, but they also find a way around it if the cookie is refused, but only for that session, hence the name.

    Yes, if you do need this to function, then logins are what you'd need.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •