Forum Moderators: coopster
if (preg_match("/[^0-9a-z \.\&]/i", $Data)) { I now find that I need to allow single and double quotes, too. I tried adding them with and without escaping them, but couldn't seem to make it work. I'm sure I'm missing something simple, but unfortunately I can't find the problem.
Ideas, anyone?
Thanks,
Matthew
if (preg_match("/[^0-9a-z \.\&\'\"]/i", $Data)) {
if (preg_match("/[^0-9a-z \.\&'\"]/i", $Data)) {
if (preg_match("/[^0-9a-z \.\&'"]/i", $Data)) {
if (preg_match("/[^0-9a-z \.\&\'"]/i", $Data)) { None of them work. It's got to be something simple but I'm overlooking it. (It's been a tough day; I'm trying to write something to replace a third-party script that was hacked this morning...)