Refreshing session pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MarbleKittyKat
Forum Newbie
Posts: 5
Joined: Sat Feb 14, 2004 7:57 am

Refreshing session pages

Post by MarbleKittyKat »

Does anybody know how to stop the following occurring?

- I write a message in the form in my forums script
- I click submit, and it comes up with a deliberate error (such as it has found a swear word which isn't allowed)
- When I click Back to go and edit the message, I have to retype the whole thing because it is no longer in the textarea

I think it might be because I am using it all on one page:
if (!isset($message)) { print form }
if (isset($message)) { check for errors }

Or something..

Any suggestions?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

When I click Back
Is this a 'back' button you've got on the form, or do you mean the 'back' button in the browser?
MarbleKittyKat
Forum Newbie
Posts: 5
Joined: Sat Feb 14, 2004 7:57 am

Post by MarbleKittyKat »

Sorry - I meant in the browser.
Post Reply