You could put the contents into a db table with a pending flag and then just 
pass the row id and a secret/hash (to stop people changing the id) via get.

You could have another table in which you save the row and then as above but 
copy the row from one table to the other once authenticated.

Another option would be to use a temp file which would be similar to storing it 
in a session anyway.

You could also stick the record into memcached or apc and access it as above. 

Doesn't your login mechanism use sessions anyway? 

I am not sure how you would do the reposting though.

-original message-
Subject: [Agavi-Users] Question on POST data redirection after authentication
From: [email protected]
Date: 29.01.2010 04:19

Hi all,

I have a Web form that asks the user for some input and then offers a
'save to database' option. The form data is then POSTed to a procedure
that writes the corresponding database record. However, this option
expects the user to be logged in. If the user is not logged in, then
on selecting this option, they are instead redirected to a login form.

My question is: if the user is not logged in, how do I correctly
transfer the POSTed form data from the initial form all the way
through the login process and then re-POST it back to the
writeRecord() procedure?

I considered a couple of options:
-- Transferring the data from request to request using GET. However
one of the data values is a reasonably large XML document which I
would then need to somehow serialize before passing along. Have not
explored this further but can do if this is the best available option.
-- Storing the POST data in a session if the user is not
authenticated, and then retrieving it post-authentication. However, in
this case, I'm not sure how to POST it back to the target action.
Also, I suspect it would not work in case the client doesn't permit
session cookies.

Any advice would be much appreciated. Many thanks.

Vikram Vaswani

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to