cooldude832 Posted January 3, 2008 Share Posted January 3, 2008 I have a form on a page and it error checks on the processor if its not valid it goes back to the first page and displays errors via GET How can I return back the form values? Quote Link to comment https://forums.phpfreaks.com/topic/84224-solved-repopulating-a-form-after-error-checking/ Share on other sites More sharing options...
dewey_witt Posted January 3, 2008 Share Posted January 3, 2008 The best way to do this would probably be to post the data to the same page and use the echo to add the post data to the values in the form elements. set wrong values color to red with error. Quote Link to comment https://forums.phpfreaks.com/topic/84224-solved-repopulating-a-form-after-error-checking/#findComment-428907 Share on other sites More sharing options...
cooldude832 Posted January 3, 2008 Author Share Posted January 3, 2008 na I just was an idiot and used sessions Quote Link to comment https://forums.phpfreaks.com/topic/84224-solved-repopulating-a-form-after-error-checking/#findComment-428910 Share on other sites More sharing options...
teng84 Posted January 3, 2008 Share Posted January 3, 2008 The best way to do this would probably be to post the data to the same page and use the echo to add the post data to the values in the form elements. set wrong values color to red with error. you can do that and once that data is correct use header file to go to the next page and once its wrong make it stay on the same page and echo the error message no SESSION or GET needed ... it all in the same page why would you use those just add a condition for that Quote Link to comment https://forums.phpfreaks.com/topic/84224-solved-repopulating-a-form-after-error-checking/#findComment-428915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.