Steve wrote:
On Mon, 28 Jul 2003 10:11:21 +0200, CJ Oxx wrote:
Is there an easy way to transfer a page POST content to the next page?
[snip]
If you already have a form that the user is filling in, then hidden form
fields might still be the best way to go, assuming they don't contain any
'sensitive' data. Given that your problem seems to be sessions expiring
while waiting for user response, you might also want to look at storing
session info in a database, to restart sessions when people log in again.
Indeed, there is already a form present in the shape of the login form
where I can add hidden fields to.
I am wondering how a custom session handler (by making use of the
database), can solve my problem. The problem I am experiencing atm is
that for some users, the session cookie on the server side gets deleted
after a while (I for one have yet to experience it). I have been able
to narrow it down to the server side since using SID instead of client
side server cookies does not have any effect. I have read about
problems like this happening to other PHP users, but nobody seems to
have a solution for it (my hosting company uses PHP 4.1.2, so if there
would be any bugfixes in new PHP versions, I sadly can not make use of it).
If I would use the db for session management, I will need to create a
cookie on the user side which identifies the session. However, I would
like the site to work also in places where cookies are disabled, so I
would have to come up with a replacement for SID as well I suppose (the
platform needs to be used in an educational environment where strict
cookie rules often apply). But if the link between the DB and the end
user gets broken for some reason, I still need a similar mechanism to
re-post the POST content, don't I... On the other hand it will be very
unlikely for this to happen since you are able to control the session
management better. I do use objects in my sessions (I have written some
OO form classes which are stored in the session itself) and am a bit
afraid of possible problems with serialising objects in the DB (just
because I have never done it).
Anyway, these are my thoughts on this, I would very much like a response
on this since I find it a very interesing matter.