I have a simple form validation class in PHP. It works like this:
A: form page that POSTs results to VALIDATION page
VALIDATION: checks results. If wrong, set cookies with the name of the fields that are wrong and the message for each input error. Go back to A form page by using headers location property.
A: if the cookies are present, print error messages associated with each field as well as the rest of the form.
This works well in all browsers but Firefox. Firefox is setting and deleting the cookies fine. But when VALIDATION sends user back to page A, the same error messages of last input errors are present. This despite cookies being different from last time.
I've tried to use the following lines to invalidate cache, but had no luck:
header( "Cache-Control: no-cache, no-store, must-revalidate" );
Anyone knows what's going on?