Weird HTML FORM Behaviour

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Weird HTML FORM Behaviour

Post by AGISB »

I got a blog input form I recently added login security to and I am experiencing a weird behaviour of the form when reloaded or back Button is pressed.

Without any sessions the Form keeps data that is e.g. in a textarea when the user accidently clicks the back button or a link etc. so when he goes forward or back to the form the data is still there and he does not have to retype it all over again.

When I add a session_start() to that page that behaviour changes completely. Now the form always is resetted so the data is lost. Is there any way to preserve the previous behaviour when using sessions?


Update: I at least could identify the problem that frustrated the user. The form has pic upload fields and when the cursor is on that field or not on a text field whatsoever, the Keyboard back button executes a browser back button. Who in the world ever thought about that as a good idea? Can this be disabled somehow. Both IE and Firefox do this. Never notice that before.
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Re: Weird HTML FORM Behaviour

Post by AGISB »

Ok I at least found a solution for the Firefox browser to disable that backspace behaviour:

about:config

bowser.backspace_action set to 1 . 0 is backspace = back button


Still looking to chenge the session_start() behaviour
Post Reply