Re: [phplib] FORM data get lost at user timeout... From: Michael Chaney (mdchaney <email protected>)
Date: 10/17/00

> I have an input page with a lot of text edit fields and stuff like that.
> If the user forgets press the update button from time to time he overruns
> phplib's timeout (say 15 mins) the login form appears... So far so good,
> but unfortunately all the input which was made by the user is lost... Is
> there a way to retrieve the data which were inputted? It looks like it's
> impossible, since it depends on the browser where data are stored and
> since the caching should be switched off with phplib it looks like the
> only way is to make the timeout longer... Or, am I wrong?
>
> Any suggestions?

Note that the form vars are still being posted to the login form. They're
not "stored in the browser"; nor does caching come in to play; you should
read up a bit on CGI form processing to get a better understanding of that.

As for your immediate problem, you can save the posted vars and repost them.
Crudely, something like this in your loginform.ihtml, inside the form:

while (list($key,$val)=each($HTTP_POST_VARS)) {
    ?>
        <input name="<?php print $key; ?>" type="hidden" value="<?php print
$val; ?>">
    <?php
}

Make sure you don't have conflicting form names and that'll probably do it
for you. I haven't tested that code, but that's the general idea.

Michael

--
Michael Darrin Chaney
mdchaney <email protected>
http://www.michaelchaney.com

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>