Jump to content

Validating Characters


Kryptix

Recommended Posts

This topic is marked as 'Solved' so I assume the OP worked it out but in case anybody else reads this, there are lots of ways, here's one..

 

if(preg_match('#[^a-z0-9_ ]+#i', $input)) {
   // invalid characters
} else {
   // no invalid characters
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.