Results 1 to 5 of 5

Thread: PHP Form verification: preg or built in functions

  1. #1

    PHP Form verification: preg or built in functions

    I currently use separate functions to verify form data eg regular expressions to check email addresses, and other functions for length, cleaning the data etc

    I see there are now also built in functions to check form data
    eg filter_var($email,FILTER_VALIDATE_EMAIL); to check email addresses

    Which is the best approach (ie most secure, fastest)? Use separate functions that I write or modify myself or to use the built in functions?


  2. #2
    Join Date
    Jun 2009
    Heartbeat City

  3. #3
    Yeah I dont use those either, I use my own functions for validating strings.
    Submit new proxies -

  4. #4
    Why is that Keldorn?
    Just because you've always done it that way (same as me) or because you think the built in functions don't work as well as your own functions?

  5. #5
    Its just more stuff I have to remember. I'm a bit too lazy to look threw the filter_var manual. I already have email validation covered already.
    So far I haven't found a need to look threw the filter_var for anything that I am having trouble with, but I probably will someday might take interest its in IP validation method.
    Submit new proxies -

Similar Threads

  1. Glittering administrative functions
    By ViDonaghuehkkf in forum Services
    Replies: 0
    Last Post: 1 February, 2011, 07:15 AM
  2. Replies: 4
    Last Post: 13 November, 2009, 14:26 PM
  3. Simple CAPTCHA Verification Form
    By mega in forum Programming
    Replies: 1
    Last Post: 18 October, 2009, 19:01 PM
  4. PayPal Verification with a VCC
    By sivasriram in forum Business
    Replies: 14
    Last Post: 31 July, 2009, 08:08 AM
  5. Use PHP functions in JavaScript
    By ankit in forum Programming
    Replies: 3
    Last Post: 31 May, 2009, 10:12 AM

Tags for this Thread


Posting Permissions

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