Date: 12/02/99
- Next message: Narinda Reeders: "[PHPLIB] Anyone used PHPLIB with Flash?"
- Previous message: Allen Lee: "[PHPLIB] session weirdness"
- In reply to: Allen Lee: "[PHPLIB] session weirdness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try looking at the reimport_[get|post]_vars() function in the documentation
for the session class. It should do what you're looking for. Be careful when
using it, though; it will overwrite _any_ variable with those it recieved
via get or post that are of the same name, not just session variables.
A more elegent solution would be to use "temporary" variables for the form
input (or, as the docs suggest, accessing $HTTP_[GET|POST]_VARS directly),
and then (after checking the input, of course) assigning the form data to
the "permanent" session variables. (i.e.: submit a form with variable $name,
then assign $name's value to a session variable like $s_name, assuming of
course that $s_name has been registered as a session variable in your
script)
Documentation url:
http://phplib.netuse.de/documentation/documentation-3.html#ss3.8
----- Original Message -----
From: Allen Lee <neo <email protected>>
To: <phplib <email protected>>
Sent: Thursday, December 02, 1999 2:41 PM
Subject: [PHPLIB] session weirdness
> Hi,
>
> I'm making pages with forms. You submit one and move on another on the
> next page. All your answers are saved as registered session variables.
> At the end, they are all entered into a database.
>
> The problem is that after you submit an answer and it is registered, if
> you go "back" and change the answer and resubmit, the new answer is
> ignored. The original answer persists in the active_session and as a
> php variable.
>
> Anyone know how i can make it so that if you go back and resubmit, the
> new answer is the one that gets saved?
>
> Allen
> -
> PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> the body, not the subject, of your message.
>
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Narinda Reeders: "[PHPLIB] Anyone used PHPLIB with Flash?"
- Previous message: Allen Lee: "[PHPLIB] session weirdness"
- In reply to: Allen Lee: "[PHPLIB] session weirdness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

