I can give you a small advice for the function compare_two_fields. You just check if value of field 1 is equal to field 2, then it's OK. BUT what if the fields are empty? Your function would return TRUE as well, cause their content matches.
The same basically should be applied to all the functions when you validate some data from the inputs.
Also it's a good idea to check for some minimum number of characters. For example allow names that are 3 or more characters, email can not be shorter then 6 characters, and so on...
I noticed that your function check_text_fields relies on array of forbiden_symbols. That's a bad idea. It's better to rely on array of allowed characters or use regular expressions to validate the input.
Bookmarks