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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Refresh w/out Retry 1

Status
Not open for further replies.

stoolpigeon

Programmer
Aug 1, 2001
309
US
I have a form that I would like to use to change passwords in my database.

A new password is typed into 2 text boxes and then the form posts to a page that checks to see that the password conforms to business rules.

If the password is not good I would like to send the user back to the form where they enter the password. The browser says that the form needs to be refreshed- and then after refresh I have to hit retry- then I've got my form back.

All this to say I'd like to go back and have the form there w/out any of that refresh/retry stuff.

thanks for any help,
Ron
 
For things like that, I create a script which submits to itself.

If it detects input, it attempts to validate it. If it does, it forwards the browser to a new page using the "Location" header.

If it cannot validate, it outputs the page again with the erroneous input and error messges.

If it detects no input, it just outputs the form. ______________________________________________________________________
TANSTAAFL!
 
Thanks!- (You're helpful all over the place sleipnir214) I've seen that method in a tutorial- I'll put that to work.

It's funny - I've been doing php for about 3 weeks now - and once I get something that works I try to do everything the same way- but one shoe does not fit all. I need to work on avoiding that kind of thinking.

I'm still waiting for the brass cannon next to your sig.

thanks again,
Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top