For Check Functions What you think of these
I put these up on my site, but really would like some feedback from other developers.
So will be nice to hear from all of you especially if you think that there should be anything added or changed.
I'm adding a Zip file to this post rather then a link to my site to avoid any promotion for the site rather then the issue at hand
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)