Im trying to make sure a user can only enter a string which has characters [a-zA-Z_0-9] (This eqivalent to '\w'?), but it seems to not work.
If the string only contains these characters do this, otherwise do that.
Can anyone see why is isnt working?
If the string only contains these characters do this, otherwise do that.
PHP:
if(!preg_match('\w', $string))
postError;
else
continue;
Can anyone see why is isnt working?