Excellent article from CERT.$_ = "the\\/bad\$dataStuff"; # your data of course :) $OK_CHARS='-a-zA-Z0-9_.@'; # allowed characters s/[^$OK_CHARS]/_/go; # replace invalid chars with _ $user_data = $_; # sanitized version print $user_data; # output: the__bad_dataStuff
In reply to Re: validation of posted data.
by amir
in thread validation of posted data.
by hostux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |