SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    at home
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool programming approach question

    I am planning an app that processes some loan forms. There are about 80 fields of information I need to have customers fill out. Customers may not complete the app all at once so I need to have a way for them to come back and resume their work.

    I would preferably not want to store the incomplete loan apps on our servers. Could I use a cookie on the client's PC to store their work in progress, then when a completed form is sent in, clear that info?

    Is that a workable approach or is there a better option?

    TIA

  2. #2
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Realistically, unless you're going for server-side storage, cookies is the only way to go. Be nice to the user though - check if they have cookies available and warn them that they'll lose their data if they don't complete the form in one sitting.

    There are limits to how many cookies you can use and how much data is stored. I'd recommend you store all the data in a single cookie separated by | or whatever.

    You could also develop cookie-saving code in JS so the cookie is updated every time the user completes a field. It'd be best to back that up with a server-side cookie-saving system, although if the user has JS disabled, they'll probably have cookies disabled too.

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you could use the database this is the only reliable way I can see of achieving this. I wouldn't like to rely on cookies. Even if you just setup a temporary table?
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    at home
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rationale

    We were trying to find a way to store as little from the customer as possible since this is financial data. So, I thought cookies would be good since they are client side. I will have to check how much data we can store in one.

    Also, I thought there might be a little less management overhead with cookies versus a db table. Both in terms of the db calls/business logic, and the GUI screens to support it.

    TIA

  5. #5
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, there is another option you could consider. Offer the user a facility to download a file containing their current data. They could then upload it again when they came back.

    It's not a great system for novice users, but it's a safer alternative to cookies.

  6. #6
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you want to store financial data? Will it not need to be stored and processed once the form is complete anyway?

    Storing large amounts of data in a cookie is a bad idea.


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
  •