to all guru
sorry my english is not that good .
im a newbie in php and im working on a form.. how can i allow field that has only characters from a -z and numbers plus a space bar and underscore
eregi?
thanks for all help
You could try something like:
if (preg_match('/^[\da-z_ ]+$/', $str)) { echo "valid"; } else { echo "invalid"; }