Results 1 to 2 of 2

Thread: For Check Functions What you think of these

  1. #1
    Join Date
    Jun 2008

    For Check Functions What you think of these

    Hi Guys

    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
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2012
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center