How to sanitize php variable efficiently

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkjame
    New Member
    • Nov 2007
    • 4

    How to sanitize php variable efficiently

    I need to find the best way to efficiently sanitize $_POST, $_GET variables by type of variable (if $_POST['email'] then verify if it is really an email, if $_POST['zip']; verify if it's a 5 digits number, etc...)

    Any functions to recommend?

    Thank you in advance.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    see PHP Filter functions and PHP Filter @ w3schools

    Comment

    Working...