We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14214
    • 299 Posts
    I am fairly new to PHP but need to write some validation scripts for eForm to limit certain characters. But even further I would like to rather than black list characters I would rather write strict validation that would white list only certain input.

    What would the actual line of code be and where should I place it:
    To only permit letters (caps and lower) a-z
    To only permit letters (caps and lower) and numbers
    To only permit numbers and "-" (dash) symbol
    To only permit letters, numbers, quotes, commas, periods and question marks; and strip any html to basic text

    Should this be an input by input item item or perhaps in a snipet?