Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server validation - back button loses values in form - help!

Status
Not open for further replies.

leeolive

Programmer
May 14, 2002
46
0
0
GB
Hi

I am using javascript and server side validation. This is a scenario for if someone has javascript turned off and the server side validation comes into play.

I have a form which submits to a hidden page which retrieves the data and the submits it to a db. When the data is posted, I am doing server validation checks before submitting to the db ie.
if str = "" or str = "" then
print this page saying 'please complete all fields'.

Now the user has to user their back browser button to get back to the form. The problem is that sometimes the values they entered into the form are there and sometimes they aren't. How can I ensure that the values they entered are still in the form?

Really appreciate this.
Cheers
Lee
 
u have to use session and capture the values entered, when they hit back u have to refill the form using the session values...

Known is handfull, Unknown is worldfull
 
Thanks for getting back! I haven't learnt how to do session variables yet so had to post all the values and then post them back. What a mission! I guess sessions would be a lot easier but take a while to understand.
Cheers
Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top