Re: save page to DB
| From: | CC Zona | Date: | Tue, 02 Apr 2002 01:23:38 +0000 |
| Subject: | Re: save page to DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91054@lists.php.net to get a copy of this message | ||
In article <20020402002831.87022.qmail@pb1.pair.com>,
travelling_phil@hotmail.com (Phil Solomon) wrote:
> Hi all,
> I have a page that dynamically produces itself from a mysql db. It produces
> a form with the prices of scaffolding items and then uses JS as a quote
> calculator. I was wondering whether someone could tell me how to save the
> whole page into one field so that it can be reproduced in what ever state it
> was left?
> It will not ever be necessary for all the individual fields to be saved,
> only a few key totals will be eventually stored if a quote is finalised so I
> am looking for a quick way of storing the page if the quote is in progress
> and has to be left,
Don't save whole pages, just the unique portion of the pages: those totals.
Then when the person returns, generate the page as usual, plugging in any
stored values you have for him/her. You'll need a way to uniquely identify
the user, so that id can be linked back to the right set of stored data.
Sessions are perfect for this <http://php.net/session>.
Or, if you had no
concern about the implications of client-side storage, you could use JS to
store the values directly in a cookie.
--
CC