Report Database is updated before form data sanitation is complete in PHP Posted March 9, 2018 Hi. Thanks for the reply. So if I understand correctly.. I call the test_input() function and it checks and fixes input, and return the results. The results are then assigned to the variables $name, $surname, $email, $pwd and then I call ready_to_process() and it does it's job, and set $inputisgood to true. Then I call sql_process() and use the original unchecked, unprocessed (original values that the user input on the form) values $_POST['name'], $_POST['surname'] etc.. to write to the database. In other words, I never updated the actual values in POST array? Thanks a lot.