When validation succeeds it should act as if it is not there. So the addition of validation shouldn't break anything. Maybe try adding a session_commit() call before the location redirect. Please attach the current version of the page after making all of the suggested changes and I can see if I can spot any more issues.