Form Validation

Discussion in 'MySQL' started by adamiscool, Aug 5, 2008.

  1. #1
    Hello Guys :)

    Can somebody please tell me what the best way of implementing form validation with a mysql/php script is? I need a quick easy solution...

    Thanks

    Adam
     
    adamiscool, Aug 5, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    kmap, Aug 5, 2008 IP
  3. Mr_2

    Mr_2 Peon

    Messages:
    980
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    its better if you use client side validation , means less server load.

    Usualy javascript do the work.
     
    Mr_2, Aug 6, 2008 IP
  4. WatchCount.com

    WatchCount.com Active Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #4
    I'd recommend using a combination of both client-side (Javascript) and server-side (PHP) for a robust solution.

    Yes, server-side takes server resources, but you have full control of the validation process.

    Client-side: People can disable their browser's Javascript, especially the malicious folks in your audience. However, for the majority of users, with Javascript validation, the data should be clean and it'll flow through your PHP scripts without alteration.

    Here are some built-in PHP filters that you may find handy.
     
    WatchCount.com, Aug 10, 2008 IP
  5. Next

    Next Active Member

    Messages:
    249
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Next, Aug 10, 2008 IP
  6. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No! You musn't ever use only client side for validation or you are asking to be hacked
     
    garrettheel, Aug 10, 2008 IP