Page 1 of 1

retain form data

Posted: Mon Jul 21, 2008 2:44 pm
by pugs
Hi,

hope this is the place for help! :)

I have a registration form which new visitors to the site can use to become members.

My problem is when the form is submitted it's passed to another page for validation, if invalid it redirects back to the form. However is there a way to retain the data the user has inputted, so no need to re-fill the form?

ANY help appreciated

Thanks

Lisa

Re: retain form data

Posted: Mon Jul 21, 2008 2:52 pm
by Inkyskin
When creating forms, I usually post the page to itself, and do the form processing first (If the post data exists). This way if there are errors, I already have the posted data to repopulate the form with (Saves messing around with sessions/cookies etc). If there are no errors, then redirect to the next page.