The browser's back button is NOT reliable, and JavaScript's 'back' is the
same thing...

If you are carrying values forward to the next page with a hidden field, my
recommendation would be to store each page's vars is a way which is easy to
work with, and instead of the browser's back button, prove them with <FORM>
buttons for back and forward.  This way, the user's input from previous
pages is set in the POST vars, and you can do something like:

<INPUT name="first" size="20" value="<? if(isset($first)) { echo
stripslashes($first); } else { echo "please enter your first name"; } ?>">

However, some people don't like using forms in this way, and it doesn't
solve the problem of people hitting their back button.  As you already
recognised, sessions would be a great way for keeping this data on hand,
because you can detect if the user has already seen "page 1" and flow in the
data they already entered.

Also consider inserting the data directly into a database (either the "real"
table, or a temporary table), which can provide the same options.

I like the idea of sessions best, but haven't really spent AGES testing each
method, looking for pros and cons.

Creative Director

on 18/04/02 8:58 AM, Vladislav Kulchitski ([EMAIL PROTECTED]) wrote:

> Hi,
> I am using registration form with a number of different steps. And if,
> for instance, the user wants to come back to correct something, I am
> using the back img button with the link:
> javascript:history.back(1)
> I am wondering how many people are actually using the way I do, and if
> it's reliable at all or not, I mean whether there are browsers wouldn't
> support returning back and keep the information in the fields.
> Advice would be greatly appreciated,
> Thanks,
> Vlad
> p.s. probably the best way is to use sessions(?), but I am carrying
> values through the steps via <input type=hidden name=name value=value>
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to